How to Add a User to a Group in Linux

Simply type this:

usermod -a -G GROUP USER


gpasswd -a USER GROUP

Where USER is the user you want to add and GROUP is the group the user will now be a member. If you are currently logged in as USER, Login again for the new changes to take effect. Then, verify with:


It should look something like:

uid=10777(user) gid=16875(group1) groups=127(group2),16839(group3) context=…


64 Words

2010-07-16 15:17 +0000