Site Navigation

Feb 23, 2010

Unix: Add a User Account in Solaris

Since it seems like I have to set up a new Solaris VM every year or two, adding a new user is a part of the process. So instead of having to look this up again, I thought I would write down the steps this time.

  1. Log into Solaris as root
  2. Type the following command to add a user:

    useradd -d /export/home/username -m -s /usr/bin/bash -c "User Full Name" username
  3. The -d option specifies where to create the users directory. The -m option actually creates the directory if it does not exist. The -s option sets your default command line shell. -c sets the users full name. The new username is the last option on the command line. This sets up the account, but does not set the password.

  4. To set the password type: passwd username
  5. When prompted enter the new password twice.
That's it. You should have a new user account all set up. Log out as root and you can log into your new account.
Post a Comment

Favorite Links Feed