Linux Scroll

Just another WordPress.com 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

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

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: