Sun Microsystems Logo
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next

Example--Adding a Group With the Solaris Management Console's Groups Tool

The following example identifies the steps to add the group mechanoids (group ID 101) to the system starbug. This example assumes that the launcher has been started and Users tool is open.

You can add existing users to the group when you add the group. Or, you can just add the group and then add the user to the group when you add the user.

  • Select Add Group from the Action menu.

  • Identify the group name, mechanoids, at the Group Name prompt under Group Identification.

  • Identify the group number, 101, at the Group ID number prompt.

  • Click on OK.

ProcedureHow to Add a User With the Solaris Management Console's Users Tool

Use the following procedure to add a user to the system.

  1. Become superuser or assume an equivalent role.

  2. Start the Solaris Management Console.

    # /usr/sadm/bin/smc &

    For more information on starting the Solaris Management Console, see How to Start the Console as Superuser or as a Role or How to Start the Solaris Management Console in a Name Service Environment.

  3. Double-click the This Computer icon under the Management Tools icon in the Navigation pane.

    A list of categories is displayed.

  4. (Optional) Select the appropriate toolbox for your name service environment.

  5. Double-click the System Configuration icon.

  6. Double-click the User Accounts icon.

  7. Provide the superuser password or the role password.

  8. Double-click the Users icon.

    Use the Context help to add a user to the system.

Example--Adding a User With the Solaris Management Console's Groups Tool

The following example identifies the steps to add the user kryten (user ID 1001) to the system starbug. This example assumes that the launcher has been started and Users Tool is open.

Click Next between the steps below.

  • Select Add User-->With Wizard from the Action menu.

  • Step 1 - Identify the user's name or login name, kryten, at the User Name prompt under Group Identification.

  • (Optional) Identify the user's full name, kryten series 3000, at the Full Name prompt.

  • (Optional) Provide a further description of this user at the Description prompt.

  • Step 2 - Provide the user ID, 1001, at the User ID Number prompt.

  • Step 3 - Select the User Must Use This Password At First Login option.

    Provide a password for the user at the Password prompt and then confirm the password at the Confirm Password prompt.

  • Step 4 - Select the user's primary group, mechanoids.

  • Step 5 - Create the user's home directory by accepting the defaults at the Server and Path prompts.

  • Step 6 - Specify the mail server.

  • Step 7 - Review the information you provided and go back to correct the information, if necessary. Otherwise, click on Finish.

How to Add Groups and Users With CLI Tools

This section provides examples of adding users and groups with CLI tools.

Example--Adding a Group and User With the groupadd and useradd Commands

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).

Example--Adding a Group and User With the smgroup and smuser Commands

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).

ProcedureHow to Share a User's Home Directory

  1. Become superuser or assume an equivalent role on the system that contains the home directory.

  2. Verify that the mountd daemon is running.

    # ps -ef | grep mountd
    root   176     1  0   May 02 ?        0:19 /usr/lib/nfs/mountd

    The /usr/lib/nfs/mountd line shows whether the mountd daemon is running.

  3. If the mountd daemon is not running, start it.

    # /etc/init.d/nfs.server start

  4. List the file systems that are shared on the system.

    # share

  5. Select one of the following based on whether the file system containing the user's home directory is already shared.

    1. If the user's home directory is already shared, go to the verification step below.

    2. If the user's home directory is not shared, go to Step 6.

  6. Edit the /etc/dfs/dfstab file and add the following line.

    share -F nfs /file-system

    file-system is the file system containing the user's home directory that you need to share. By convention, the file system is /export/home.

  7. Share the file systems listed in the /etc/dfs/dfstab file.

    # shareall -F nfs

    This command executes all the share commands in the /etc/dfs/dfstab file, so you do not have to wait to reboot the system.

  8. Verify that a user's home directory is shared, as follows:

    # share

Previous Previous     Contents     Index     Next Next