manual page first distributed with 4.2BSD
[unix-history] / usr / src / usr.bin / passwd / passwd.1
CommitLineData
708a7b10
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
c40a8130 5.\" @(#)passwd.1 6.1 (Berkeley) %G%
708a7b10 6.\"
c40a8130 7.TH PASSWD 1 ""
708a7b10
KM
8.UC 4
9.SH NAME
c40a8130 10chfn, chsh, passwd \- change password file information
708a7b10
KM
11.SH SYNOPSIS
12.B passwd
c40a8130
KM
13[
14.B \-f
15] [
16.B \-s
17] [ name ]
708a7b10 18.SH DESCRIPTION
c40a8130
KM
19This command changes (or installs)
20a password, login shell
21.RB ( \-s
22option), or GECOS information field
23.RB ( \-f
24option)
708a7b10
KM
25associated with the user
26.IR name
27(your own name by default).
28.PP
c40a8130
KM
29When altering a password,
30the program prompts for the current password and then for the new one.
708a7b10
KM
31The caller must supply both.
32The new password must be typed twice, to forestall mistakes.
33.PP
34New passwords must be at least four characters long if they use
35a sufficiently rich alphabet and at least six characters long
36if monocase.
37These rules are relaxed if you are insistent enough.
38.PP
39Only the owner of the name or the super-user may change a password;
40the owner must prove he knows the old password.
c40a8130
KM
41.PP
42When altering a login shell,
43.I passwd
44displays the current login shell and then prompts
45for the new one.
46The new login shell must be one of the approved shells:
47.IR /bin/sh ,
48.IR /bin/csh ,
49.IR /bin/oldcsh ,
50or
51.I /usr/new/csh
52unless you are the super-user.
53.PP
54The super-user may change anyone's login shell; normal users
55may only change their own login shell.
56.PP
57When altering the GECOS information field,
58.I passwd
59displays the current information, broken into
60fields, as interpreted by the
61.IR finger (1)
62program, among others, and prompts for new values.
63These fields include a user's
64``real life'' name, office room number,
65office phone number, and home phone number.
66Included in each prompt is a default value,
67which is enclosed between brackets.
68The default value is accepted simply by typing a carriage
69return. To enter a blank field, the word ``none'' may
70be typed. Below is a sample run:
71.IP
72.B "Name [Biff Studsworth II]:"
73.br
74.B "Room number (Exs: 597E or 197C) []:"
75521E
76.br
77.B "Office Phone (Ex: 1632) []:"
781863
79.br
80.B "Home Phone (Ex: 987532) [5771546]:"
81none
82.sp
83.PP
84.I Passwd
85allows phone numbers to be entered with or without hyphens.
86Because
87.I finger
88only knows about UCB extensions,
89.I passwd
90will insist upon a four digit number (after the hyphens are removed)
91for office phone numbers.
92Also, room numbers must be in Evans or Cory;
93again, this is also because of
94.IR finger .
95.PP
96It is a good idea to run
97.I finger
98after changing the GECOS information
99to make sure everything is setup properly.
100.PP
101The super-user may change anyone's GECOS information; normal
102users may only change their own.
708a7b10
KM
103.SH FILES
104/etc/passwd
105.SH "SEE ALSO"
c40a8130 106login(1), finger(1), passwd(5), crypt(3)
708a7b10
KM
107.br
108Robert Morris and Ken Thompson,
109.I UNIX password security
110.SH BUGS
c40a8130
KM
111The encoding of the office and extension information
112is installation dependent.