Go to main content

Managing User Accounts and User Environments in Oracle® Solaris 11.4

Exit Print View

Updated: April 2019

How to Add a Group

When an administrator creates a group, the system assigns the solaris.group.assign/groupname to that administrator, giving the administrator complete control over that group. If another administrator who has the same authorization creates a group, that administrator has the control over that group. An administrator who has control of one group cannot administer the group of the other administrator. For more information, see the groupadd(8) and groupmod(8) man pages.

  1. Become an administrator with the root role or an administrator who has the solaris.group.manage authorization.

    See Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.4.

  2. List the existing groups.
    # cat /etc/group
  3. Create a new group.
    $ groupadd -g group-ID group-name

    Assigns the group ID for the new group

    For more information, see the groupadd(8) man page.

Example 2  Setting Up a Group and User With the groupadd and useradd Commands

This example shows how to use the groupadd and useradd commands to add the group scutters and the user scutter1 to files on the local system.

# groupadd -g 102 scutters
# useradd -u 1003 -g 102 -d /export/home/scutter1 -s /bin/csh \
-c "Scutter 1" -m -k /etc/skel scutter1
64 blocks

For more information, see the groupadd(8) and useradd(8) man pages.