Add an existing user to an existing group in Linux

If you want to a add a user to an existing group this is how you do it.

[local_username@localhost /]$ useradd -a -G somegroup username

Then log out and log back in for the new group settings to take effect.


Managing permissions for a group is an important concept to understand if you are working with Unix like file systems. I have tried to give a very simple and concise example here. If you are looking for more examples on the web on how to create groups and more, you will find plenty of resources. This articles purpose is to answer a question as quickly as possible.

comments powered by Disqus