Administrator's Guide

# passwd -f user1
Lock or disable an account:
# passwd -l user2
Enable password aging:
# passwd -n 7 -x 28 user1
View password aging status for a specific user:
# passwd -s user
View password aging status for all users:
# passwd -sa
2.4.4.2 The /etc/passwd File Format
The /etc/passwd file is used to authenticate a user at login time. The file contains an
entry for every account on the HP-UX system. Each entry consists of seven fields, separated
by colons. A typical /etc/passwd entry looks like this:
robin:Z.yxGaSvxAXGg:102:99:Robin Hood,Rm 3,x9876,408-555-1234:/home/robin:/usr/bin/sh
The fields contain the following information (listed in order), separated by colons:
1. robin—User (login) name, consisting of up to 8 characters.
2. Z.yxGaSvxAXGg—Encrypted password field.
3. 102—User ID, an integer ranging from 0 to MAXINT-1 (equal to 2,147,483,646
or 2
31
-2).
4. 99—Group ID, from /etc/group, an integer ranging from 0 to MAXINT-1.
5. Robin Hood,Rm 3,x9876,408-555-1234—Comment field, used to identify
such information as the user's full name, location, and phone numbers. For historic
reasons, this is also called the gecos field.
6. /home/robin—Home directory, the user's initial login directory.
7. /usr/bin/sh—Login shell path name, executed when the user logs in.
The user can change the password by invoking passwd, the comment field (fifth field)
with chfn, and the login program path name (seventh field) with chsh. The system
administrator sets the remaining fields. The user ID must be unique. See chfn(1), chsh(1),
passwd(1), and passwd(4) for more information.
2.4.5 The /etc/shadow Shadow Password File
Increasing computational power available to malicious password decrytpers has made
the nonhidden passwords in the /etc/passwd file vulnerable to decryption.
A shadow password enhances system security by hiding encrypted passwords in a
shadow password file. You can move encrypted passwords previously stored in the
publicly readable /etc/passwd file to the /etc/shadow file, which is accessible only
by a user with the appropriate privileges.
2.4 Managing Passwords 43