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