Jump to content

Add user to group in Linux

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
Guest_erik_*

Guest_erik_*
  • Guests
How do I add a user to a group in Linux/Unix from the console/shell prompt?

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
To create a new group:
groupadd <groupname>

Example:
groupadd mygroup

To add users to a group:
useradd -G <groupname> username

The -G specifies "group"
Example:
useradd -G mygroup jordan