Sun offers several authentication methods for logging in. The most basic is the "files" method which uses /etc/passwd, /etc/shadow, and /etc/group. More sophisticated network versions use NIS, NIS+, LDAP, or other proprietary network based authentication processes. These are used in a corporate environement and beyond the scope of these pages.
Sun offers several tools for adding accounts. The best of these run under CDE or open windows. Account names can be 1 - 8 alphanumeric characters. If other family members will be using this machine, you can set up separate accounts for them. Accounts also have a UID (User ID) number and a GID (Group ID) number. This is what Solaris and other UNIX based systems use internally to keep track of who you are and what files you own. The super user, root, is UID 0. When add an account, you can choose the UID number or let the system pick it for you. If you have more than one Sun machine on your network, it is useful to use the same UID on each machine. This way, if you NFS mount a disk on one machine from another, files owned by you on the remote machine are still owned by you across the NFS mount. You can find the UID on an existing acount by running the command: id at the UNIX promptThe output will look like:
uid=727(stymar) gid=358(ce)
The is some advantage in knowing how to add an account using the direct approach. You know a list of places to look if there is trouble. You need to perform the following actions to create an account by editing files:
You now have an empty account set up. In all cases, replace stymar by your userid. You may want to set up a custom .profile, .dtprofile, and .kshrc file for the account.
The solaris useradd(1m) command peforms all the above function with the exception of poplulating the home directory (which it can do given a template) and setting the password. This command has to be run as root. This is probably the easiest and most common way to add local accounts. More on adding accounts
Sample:
useradd -c "Fred Flintstone" -m -d /home/fredf -u 714 -s /usr/bin/ksh fredfAdmintool has been replaced in Solaris 10 by /usr/sbin/smc (Solaris Management Console). However older versions of Solaris still have the admintool command.
Accounts can be added on the Sun using the graphical user interface (GUI) tool admintool. When the tool first comes up it displays a list of the accounts known in the /etc/passwd file.
Run /usrbin/admintool from the command line to bring up the main admintool menu shown below. From the Edit pulldown option, select Add to bring up the add dialog. Fill in the userid, uid, Comment (user full name) and the home directory. Use the pulldown to change the Password type to Normal Password... When you do this, you will be prompted for the password for the user. Enter the password for the account a press enter. Then in the add dialog, press Apply to create the account.