Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Configuring a System
Controlling Access to a System
Chapter 3 247
To see the steps that SAM executes, choose Options/View SAM Log...
When you use SAM to add a user, SAM does the following:
• creates an entry in the /etc/passwd file for the user
• creates a home directory for the user
• copies start-up files (.cshrc, .exrc, .login, .profile) to the user’s
home directory
Manually Adding a
User
Use the following steps to add a user from the command line.
Step 1. Add the user to the /etc/passwd file.
As root, use the /usr/sbin/vipw command to edit /etc/passwd. See
vipw (1M), passwd (4), and passwd (1)
For example, you might want to add this line for user tom:
tom:,..:102:20:,,,:/home/tom:/usr/bin/sh
The default for the shell is an empty field, which causes the system to
use /sbin/sh as the login. The “,..” in the password field will require
tom to set his password when he first logs in.
IMPORTANT Note that the shell for root must not be changed from /sbin/sh.
Step 2. Create a home directory. For example:
/usr/bin/mkdir /home/tom
Change the ownership of the directory to the user’s name. For example:
/usr/bin/chown tom:users /home/tom