Posts Tagged “usermod”

Often times we need to add a user to a new group to give them permissions to certain directories. This is easily accomplished with the following command:


Well this is a double edged sword as this command will strip any group the user is already in. A little less well known is the ‘-a’ switch that will allow you to append the user to the new group while leaving any previous memberships intact.

# usermod -aG GROUP USERNAME

Of course, most of the people I discussed this with, just modify the /etc/group file and maybe a safer practice for you.

Comments 1 Comment »