Go to main content

Managing User Accounts and User Environments in Oracle® Solaris 11.3

Exit Print View

Updated: March 2017
 
 

How to Add a User

  1. Become an administrator or a user with the User Management rights profile.

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

  2. Create a local user.

    By default, the user is created locally. If you include the –S ldap option, the user is created in an existing LDAP repository.

    # useradd -d dir -m username
    –d

    Specifies the location of the home directory of the user

    Use the –d localhost:/export/home/username instead of –d /export/home/username to force the entry to be written to auto_home.

    –m

    Creates a local home directory on the system for the user.

    For a detailed description of all of the options and arguments that you can specify with the useradd command, see the useradd(1M) man page.


    Note -  The account is locked until you assign the user a password.
  3. Assign the user a password.
    # passwd username
    New password: Type user password
    Re-enter new password: Retype password

    For more command options, see the useradd(1M) and passwd(1) man pages.

See Also

After creating a user, you might need to perform some additional tasks, including adding and assigning roles to a user, and displaying or changing the rights profiles of a user. For more information, see Creating a Role in Securing Users and Processes in Oracle Solaris 11.3.