Adding user to new/existing group:
usermod -G group user - adds user to group/multiple groups
usermod -G sales testuser - example
Append user to existing group:
usermod -a -G group user - appends user to group/multiple groups
Link to man usermod http://linux.die.net/man/8/usermod
Removing user from a group:
gpasswd (administer /etc/group)
gpasswd -d user group - removes user from group
usermod -G group user - removes all the other groups apart from specified.
link to man gpasswd http://man.he.net/man1/gpasswd
No comments:
Post a Comment