Sunday, December 09, 2007

lesson learns, usermod command

on linux, probably unix too.
to modify a user a user information on shell you type
usermod
here's what i learn, to assignment a group to user, you type
usermod -G groupname username
here's the catch, it will remove all the other group the user is in.

Another thing that I learn,is that to append, a group to a user, on shell, use the -a parameter.
So to append group to user, type:
usermod -aG groupname username
one more thing, always add the -a parameter, before -G, for some reason, -G assumes that -a is a group. so it is always
usermod -a -G groupname username
usermod -aG groupname username
but never
usermod -Ga groupname username
usermod -G -a groupname username
could be an ubuntu bug.

No comments:

Post a Comment