Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Configuring a System
Controlling Access to a System
Chapter 3248
Step 3. Ensure that the user has the appropriate shell start-up files to execute
when logging in. The three most popular shells in the HP-UX
environment are: POSIX shell, Korn shell, and C shell. Each shell uses
particular start-up files.
You can create standard start-up files (templates) that can be copied to
users’ directories. The directory most often used for this purpose is
/etc/skel.
For example:
cp /etc/skel/.profile /users/tom/.profile
Step 4. Change the ownership of the start-up file to the new user’s account. For
example:
/usr/bin/chown tom .profile
Step 5. Add the user to a primary working group. For example:
/usr/bin/chgrp users tom
Automating the Process of Adding a User
When you have several users to add to a system, you can save time by:
Using the SAM Template
Using the useradd Command
Using the SAM
Template
Create a template that contains uniform information about accounts by
initiating SAM and then choosing Users and Groups, pulling down the
Actions menu, and finally choosing User Templates and Create. Read
the SAM online help for details.
Table 3-3 Start-Up Files
Shell Name Location Start-up Files
POSIX shell /usr/bin/sh,
/sbin/sh
.profile and any file specified in
the ENV environment variable
(conventionally .kshrc)
Korn shell /usr/bin/ksh
C shell /usr/bin/csh .login and .cshrc