Hello again mldvx4,
I was thinking exactly like this. That your script will do something like that.
Well an alternative solution would be to remove the user Linux::usermod->del(username); (I assume the module removes the user from all groups) and after that create a new user Linux::usermod->add(username, password, uid, gid, comment, home, shell); with the updated name. That could be a workaround (assuming there are no errors on this one as well). Not to forget you can assign the user to the desired groups
. But again this is just theory I have not tested it so I do not know if there is a bug in all these commands.@users = qw(user1 user2 user3); Linux::usermod->grpadd(groupname, gid, "@users")
Let us know at the end what solution you came up with. BR / Thanos
In reply to Re^3: Linux::usermod - user name ... already exists
by thanos1983
in thread Linux::usermod - user name ... already exists
by mldvx4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |