BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / passwd.0
PASSWD(1) UNIX Programmer's Manual PASSWD(1)
N\bNA\bAM\bME\bE
chfn, chsh, passwd - change password file information
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
p\bpa\bas\bss\bsw\bwd\bd [ -\b-f\bf ] [ -\b-s\bs ] [ name ]
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
This command changes (or installs) a password, login shell
(-\b-s\bs option), or GECOS information field (-\b-f\bf option) associ-
ated with the user _\bn_\ba_\bm_\be (your own name by default).
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 fore-
stall mistakes.
New passwords must be at least four characters long if they
use a sufficiently rich alphabet and at least six characters
long if monocase. These rules are relaxed if you are
insistent enough.
Only the owner of the name or the super-user may change a
password; the owner must prove he knows the old password.
When altering a login shell, _\bp_\ba_\bs_\bs_\bw_\bd 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
/_\be_\bt_\bc/_\bs_\bh_\be_\bl_\bl_\bs unless you are the super-user. If /_\be_\bt_\bc/_\bs_\bh_\be_\bl_\bl_\bs
does not exist, the only shells that may be specified are
/_\bb_\bi_\bn/_\bs_\bh and /_\bb_\bi_\bn/_\bc_\bs_\bh.
The super-user may change anyone's login shell; normal users
may only change their own login shell.
When altering the GECOS information field, _\bp_\ba_\bs_\bs_\bw_\bd displays
the current information, broken into fields, as interpreted
by the _\bf_\bi_\bn_\bg_\be_\br(1) program, among others, and prompts for new
values. These fields include a user's ``real life'' name,
office room number, office phone number, and home phone
number. Included in each prompt is a default value, which
is enclosed between brackets. The default value is accepted
simply by typing a carriage return. To enter a blank field,
the word ``none'' may be typed. Below is a sample run:
N\bNa\bam\bme\be [\b[B\bBi\bif\bff\bf S\bSt\btu\bud\bds\bsw\bwo\bor\brt\bth\bh I\bII\bI]\b]:\b:
R\bRo\boo\bom\bm n\bnu\bum\bmb\bbe\ber\br (\b(E\bEx\bxs\bs:\b: 5\b59\b97\b7E\bE o\bor\br 1\b19\b97\b7C\bC)\b) [\b[]\b]:\b: 521E
O\bOf\bff\bfi\bic\bce\be P\bPh\bho\bon\bne\be (\b(E\bEx\bx:\b: 1\b16\b63\b32\b2)\b) [\b[]\b]:\b: 1863
H\bHo\bom\bme\be P\bPh\bho\bon\bne\be (\b(E\bEx\bx:\b: 9\b98\b87\b75\b53\b32\b2)\b) [\b[5\b57\b77\b71\b15\b54\b46\b6]\b]:\b: none
_\bP_\ba_\bs_\bs_\bw_\bd allows phone numbers to be entered with or without
hyphens. It is a good idea to run _\bf_\bi_\bn_\bg_\be_\br after changing the
Printed 7/9/88 June 5, 1986 1
PASSWD(1) UNIX Programmer's Manual PASSWD(1)
GECOS information to make sure everything is setup properly.
The super-user may change anyone's GECOS information; normal
users may only change their own.
F\bFI\bIL\bLE\bES\bS
/etc/passwd The file containing all of this information
/etc/shells The list of approved shells
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
login(1), finger(1), passwd(5), crypt(3)
Robert Morris and Ken Thompson, _\bU_\bN_\bI_\bX _\bp_\ba_\bs_\bs_\bw_\bo_\br_\bd _\bs_\be_\bc_\bu_\br_\bi_\bt_\by
Printed 7/9/88 June 5, 1986 2