Linux Scroll

Just another site

Linux manage group

Create engineering group:

$ groupadd -g 120 engineering

Modify group (change engineering group to purchasing group):

$ groupmod -n engineering purchasing

Add user to group:

$ groupmod -A username engineering

Remove user from group:

$ groupmod -R username engineering

Delete engineering group:

$ groupdel engineering

Change user primary group:

$ newgrp engineering

$ useradd -G engineering

Linux group database: /etc/group
List all groups:

$ cat /etc/group

0 = root group
0 – 99 = system group
Normal group start from 100


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: