Solaris adding group

in Categories News last updated March 16, 2006

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

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Share this on (or read 2 comments/add one below):

2 comment

    Have a question? Post it on our forum!