passwd(1) — Commands
OSF
NAME
passwd, chfn, chsh − Changes password file information
SYNOPSIS
passwd [-f | -s] [username]
chfn [username]
chsh [username]
The passwd command changes (or installs) the password associated with your username (by default) or the specified username. The chfn command changes GECOS information associated with your username or the specified username. The chsh command changes the login shell of your username or of the specified username.
FLAGS
-fInvokes the chfn command when given with the passwd command.
-sInvokes the chsh command when given with the passwd command.
DESCRIPTION
When altering a password, the program prompts for the current password and then for the new one. The caller must supply both. The new password must be typed twice to forestall mistakes.
The maximum length of a password is eight characters. If you enter more than eight characters when creating a password, passwd ignores any characters after the eighth.
When altering the GECOS information field, chfn displays the current information, broken into fields, as interpreted by by the finger program, among others, and prompts for new values. These fields include a user’s proper name, office room number, office phone number, and home phone number. Included in each prompt is a default value, which is enclosed in [ ] (brackets). The default value is accepted simply by pressing <Return>. To enter a blank field, the word none can be entered.
The chfn command allows phone numbers to be entered with or without dashes. It is a good idea to run finger after changing the GECOS information to make sure everything is set up properly.
A superuser can change anyone’s GECOS information; other users can only change their own.
When altering a login shell, chsh displays the current login shell and then prompts for the new one. The new login shell must be one of the approved shells listed in /etc/shells unless you have superuser privileges. If /etc/shells does not exist, the only shells that can be specified are /bin/sh and /bin/csh.
A superuser can change anyone’s login shell; normal users can only change their own login shell.
EXAMPLES
1.To change your password, enter:
passwd
You are prompted for your old password (if it exists). You are then prompted twice for the new password.
2.To change the office number and building values in your GECOS information, enter:
chfn
Your current GECOS values are displayed. Follow the instructions and change your office number. For example, enter:
Name [Huan Kim]:
Room Number [3A-41]: 4A-43
Office Phone [3-1234]:
Home Phone [987532]:
FILES
/etc/passwdContains user information.
/etc/shellsThe list of approved shells.
RELATED INFORMATION
Commands: finger(1), login(1).
Files: passwd(4).