formats

Add User to Group in Linux




In Linux, the command gpasswd can be used to add or remove users from a group. I’ll show you how!



To add a user to a group, use tack a:

$ sudo gpasswd -a user group

The output looks like this:

$ sudo gpasswd -a joe admin
Adding user joe to group admin




To remove a user from a group, use tack d:

$ sudo gpasswd -d user group

The output looks like this:

$ sudo gpasswd -d joe admin
Removing user joe from group admin




Cool!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Home linux Add User to Group in Linux