This section provides examples of adding users and groups with CLI tools.
The following example shows how to use the groupadd and useradd commands to add the group scutters and user scutter1 to files on the local system. These commands cannot be used to manage users in a name service environment.
# 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 groupadd(1M) and useradd(1M).
The following example shows how to use the smgroup and smuser commands to add the group gelfs and the user camille to the NIS domain solar.com on the host starbug.
# /usr/sadm/bin/smgroup add -D nis:/starbug/solar.com -- -g 103 -n gelfs # /usr/sadm/bin/smuser add -D nis:/starbug/solar.com -- -u 1004 -n camille -c "Camille G." -d /export/home/camille -s /bin/csh -g gelfs |
For more information, see smgroup(1M) and smuser(1M).