in reply to Re^2: Linux::usermod - user name ... already exists
in thread Linux::usermod - user name ... already exists
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Linux::usermod - user name ... already exists
by mldvx4 (Hermit) on Mar 20, 2019 at 06:17 UTC | |
|
Re^4: Linux::usermod - user name ... already exists
by mldvx4 (Hermit) on Mar 20, 2019 at 14:20 UTC | |
by haukex (Archbishop) on Mar 21, 2019 at 13:42 UTC | |
by mldvx4 (Hermit) on Mar 22, 2019 at 11:59 UTC | |
by haukex (Archbishop) on Mar 25, 2019 at 09:55 UTC | |
by choroba (Cardinal) on Mar 20, 2019 at 15:06 UTC |