Thursday, August 2, 2012

Modifying users group on the fly

This is a simple entry but sometimes tend to forget until I do a man page. Adding a users to a group cannot be easier on Linux

If you are adding a user to a secondary group, use the flag -G
# useradd -d /home/users -g users -G g09 user1


If you are modifying a user from a secondary group, use the flag -G
# usermod -G g09 user1

No comments: