Solaris adding group

by on March 16, 2006 · 2 comments· LAST UPDATED March 16, 2006

in

You can use GUI tools or command line tools. I like to use command line tools for group admin. Use groupadd command to add (create) a new group definition on the system. Use groupmod command to modify a group definition on the system.

Adding new group
Use groupadd command to add group called pusers:

# groupadd pusers

Create a group called sshusers with GID 500:

# groupadd –g 500 sshusers

Add new user volini to group sshusers:

# useradd –d /nas/home/v/volini -m volini

Add existing user rose to group sshusers:

# usermod -G pusers rose

Rename group
Change the name sshusers to ftpusers:

# groupmod -n ftpusers sshusers

Delete the group
Remove the group called foxadmin

# groupdel foxadmin

If you manually modified the /etc/group file then you can check any group file inconsistencies with grpck command:

# vi /etc/group
# grpck

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 2 comments… read them below or add one }

1 Brian November 19, 2008 at 4:42 pm

Very helpful. Good reference.

Reply

2 dave April 11, 2009 at 11:44 pm

good reference indeed sir! thanks for saving me some time!

Reply

Leave a Comment

Previous post:

Next post: