xref: /freebsd/share/man/man5/passwd.5 (revision 9aae28359d239932bdf89c40803e69edcaa23aec)
1248aee62SJacques Vidrine.\"	$NetBSD: passwd.5,v 1.12.2.2 1999/12/17 23:14:50 he Exp $
2248aee62SJacques Vidrine.\"
3afe61c15SRodney W. Grimes.\" Copyright (c) 1988, 1991, 1993
4afe61c15SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
5248aee62SJacques Vidrine.\" Portions Copyright (c) 1994, Jason Downs.  All rights reserved.
6afe61c15SRodney W. Grimes.\"
7afe61c15SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
8afe61c15SRodney W. Grimes.\" modification, are permitted provided that the following conditions
9afe61c15SRodney W. Grimes.\" are met:
10afe61c15SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
11afe61c15SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
12afe61c15SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
13afe61c15SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
14afe61c15SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
15afe61c15SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software
16afe61c15SRodney W. Grimes.\"    must display the following acknowledgement:
17afe61c15SRodney W. Grimes.\"	This product includes software developed by the University of
18afe61c15SRodney W. Grimes.\"	California, Berkeley and its contributors.
19afe61c15SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
20afe61c15SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
21afe61c15SRodney W. Grimes.\"    without specific prior written permission.
22afe61c15SRodney W. Grimes.\"
23afe61c15SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24afe61c15SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25afe61c15SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26afe61c15SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27afe61c15SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28afe61c15SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29afe61c15SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30afe61c15SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31afe61c15SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32afe61c15SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33afe61c15SRodney W. Grimes.\" SUCH DAMAGE.
34afe61c15SRodney W. Grimes.\"
35f274239bSGarrett Wollman.\"     From: @(#)passwd.5	8.1 (Berkeley) 6/5/93
367f3dea24SPeter Wemm.\" $FreeBSD$
37afe61c15SRodney W. Grimes.\"
38f5510010SYaroslav Tykhiy.Dd May 8, 2007
39afe61c15SRodney W. Grimes.Dt PASSWD 5
40afe61c15SRodney W. Grimes.Os
41afe61c15SRodney W. Grimes.Sh NAME
42248aee62SJacques Vidrine.Nm passwd ,
43248aee62SJacques Vidrine.Nm master.passwd
44afe61c15SRodney W. Grimes.Nd format of the password file
45afe61c15SRodney W. Grimes.Sh DESCRIPTION
46afe61c15SRodney W. GrimesThe
474b66483fSRuslan Ermilov.Nm
48248aee62SJacques Vidrinefiles are the local source of password information.
49248aee62SJacques VidrineThey can be used in conjunction with the Hesiod domains
5071e3251cSYaroslav Tykhiy.Sq Li passwd
51248aee62SJacques Vidrineand
5271e3251cSYaroslav Tykhiy.Sq Li uid ,
53248aee62SJacques Vidrineand the
54248aee62SJacques Vidrine.Tn NIS
55248aee62SJacques Vidrinemaps
5671e3251cSYaroslav Tykhiy.Sq Li passwd.byname ,
5771e3251cSYaroslav Tykhiy.Sq Li passwd.byuid ,
5871e3251cSYaroslav Tykhiy.Sq Li master.passwd.byname ,
59248aee62SJacques Vidrineand
6071e3251cSYaroslav Tykhiy.Sq Li master.passwd.byuid ,
61248aee62SJacques Vidrineas controlled by
62248aee62SJacques Vidrine.Xr nsswitch.conf 5 .
63248aee62SJacques Vidrine.Pp
6426605dc1STom RhodesFor consistency, none of these files should ever be modified
6526605dc1STom Rhodesmanually.
6626605dc1STom Rhodes.Pp
67248aee62SJacques VidrineThe
68248aee62SJacques Vidrine.Nm master.passwd
69248aee62SJacques Vidrinefile is readable only by root, and consists of newline separated
70a023c1a6SYaroslav Tykhiyrecords, one per user, containing ten colon
71a023c1a6SYaroslav Tykhiy.Pq Ql \&:
72a023c1a6SYaroslav Tykhiyseparated
735203edcdSRuslan Ermilovfields.
745203edcdSRuslan ErmilovThese fields are as follows:
75a023c1a6SYaroslav Tykhiy.Bl -tag -width ".Ar password" -offset indent
76a023c1a6SYaroslav Tykhiy.It Ar name
77afe61c15SRodney W. GrimesUser's login name.
78a023c1a6SYaroslav Tykhiy.It Ar password
79afe61c15SRodney W. GrimesUser's
80afe61c15SRodney W. Grimes.Em encrypted
81afe61c15SRodney W. Grimespassword.
82a023c1a6SYaroslav Tykhiy.It Ar uid
83afe61c15SRodney W. GrimesUser's id.
84a023c1a6SYaroslav Tykhiy.It Ar gid
85afe61c15SRodney W. GrimesUser's login group id.
86a023c1a6SYaroslav Tykhiy.It Ar class
87aba0edf2SDaniel HarrisUser's login class.
88a023c1a6SYaroslav Tykhiy.It Ar change
89afe61c15SRodney W. GrimesPassword change time.
90a023c1a6SYaroslav Tykhiy.It Ar expire
91afe61c15SRodney W. GrimesAccount expiration time.
92a023c1a6SYaroslav Tykhiy.It Ar gecos
93afe61c15SRodney W. GrimesGeneral information about the user.
94a023c1a6SYaroslav Tykhiy.It Ar home_dir
95afe61c15SRodney W. GrimesUser's home directory.
96a023c1a6SYaroslav Tykhiy.It Ar shell
97afe61c15SRodney W. GrimesUser's login shell.
98afe61c15SRodney W. Grimes.El
99afe61c15SRodney W. Grimes.Pp
100248aee62SJacques VidrineThe
101248aee62SJacques Vidrine.Nm
102248aee62SJacques Vidrinefile is generated from the
103d722865aSDima Dorfman.Nm master.passwd
104248aee62SJacques Vidrinefile by
105248aee62SJacques Vidrine.Xr pwd_mkdb 8 ,
106a023c1a6SYaroslav Tykhiyhas the
107a023c1a6SYaroslav Tykhiy.Ar class ,
108a023c1a6SYaroslav Tykhiy.Ar change ,
109a023c1a6SYaroslav Tykhiyand
110a023c1a6SYaroslav Tykhiy.Ar expire
111a023c1a6SYaroslav Tykhiyfields removed, and the
112a023c1a6SYaroslav Tykhiy.Ar password
11336cc06ffSGiorgos Keramidasfield replaced by a
11436cc06ffSGiorgos Keramidas.Ql *
11536cc06ffSGiorgos Keramidascharacter.
11622bf9812SWolfram Schneider.Pp
117afe61c15SRodney W. GrimesThe
118afe61c15SRodney W. Grimes.Ar name
119afe61c15SRodney W. Grimesfield is the login used to access the computer account, and the
120afe61c15SRodney W. Grimes.Ar uid
1215203edcdSRuslan Ermilovfield is the number associated with it.
1225203edcdSRuslan ErmilovThey should both be unique
123afe61c15SRodney W. Grimesacross the system (and often across a group of systems) since they
124afe61c15SRodney W. Grimescontrol file access.
125afe61c15SRodney W. Grimes.Pp
126afe61c15SRodney W. GrimesWhile it is possible to have multiple entries with identical login names
1275203edcdSRuslan Ermilovand/or identical user id's, it is usually a mistake to do so.
1285203edcdSRuslan ErmilovRoutines
129afe61c15SRodney W. Grimesthat manipulate these files will often return only one of the multiple
130afe61c15SRodney W. Grimesentries, and that one by random selection.
131afe61c15SRodney W. Grimes.Pp
132a023c1a6SYaroslav TykhiyThe login name must never begin with a hyphen
133a023c1a6SYaroslav Tykhiy.Pq Ql - ;
134a023c1a6SYaroslav Tykhiyalso, it is strongly
135a023c1a6SYaroslav Tykhiysuggested that neither upper-case characters or dots
136a023c1a6SYaroslav Tykhiy.Pq Ql \&.
137a023c1a6SYaroslav Tykhiybe part
1385203edcdSRuslan Ermilovof the name, as this tends to confuse mailers.
1395203edcdSRuslan ErmilovNo field may contain a
140a023c1a6SYaroslav Tykhiycolon
141a023c1a6SYaroslav Tykhiy.Pq Ql \&:
142a023c1a6SYaroslav Tykhiyas this has been used historically to separate the fields
143248aee62SJacques Vidrinein the user database.
144afe61c15SRodney W. Grimes.Pp
145f5510010SYaroslav TykhiyIn the
146f5510010SYaroslav Tykhiy.Nm master.passwd
147f5510010SYaroslav Tykhiyfile,
148a023c1a6SYaroslav Tykhiythe
149a023c1a6SYaroslav Tykhiy.Ar password
150a023c1a6SYaroslav Tykhiyfield is the
151afe61c15SRodney W. Grimes.Em encrypted
15226605dc1STom Rhodesform of the password, see
15326605dc1STom Rhodes.Xr crypt 3 .
154afe61c15SRodney W. GrimesIf the
155afe61c15SRodney W. Grimes.Ar password
156afe61c15SRodney W. Grimesfield is empty, no password will be required to gain access to the
1575203edcdSRuslan Ermilovmachine.
158f5510010SYaroslav TykhiyThis is almost invariably a mistake, so authentication components
159f5510010SYaroslav Tykhiysuch as PAM can forcibly disallow remote access to passwordless accounts.
160f5510010SYaroslav TykhiyBecause this file contains the encrypted user passwords, it should
161afe61c15SRodney W. Grimesnot be readable by anyone without appropriate privileges.
162afe61c15SRodney W. Grimes.Pp
163f5510010SYaroslav TykhiyA password of
164f5510010SYaroslav Tykhiy.Ql *
165f5510010SYaroslav Tykhiyindicates that
166f5510010SYaroslav Tykhiypassword authentication is disabled for that account
167f5510010SYaroslav Tykhiy(logins through other forms of
168f5510010SYaroslav Tykhiyauthentication, e.g., using
169f5510010SYaroslav Tykhiy.Xr ssh 1
170f5510010SYaroslav Tykhiykeys, will still work).
171f5510010SYaroslav TykhiyThe field only contains encrypted passwords, and
172f5510010SYaroslav Tykhiy.Ql *
173f5510010SYaroslav Tykhiycan never be the result of encrypting a password.
174f5510010SYaroslav Tykhiy.Pp
175f5510010SYaroslav TykhiyAn encrypted password prefixed by
176f5510010SYaroslav Tykhiy.Ql *LOCKED*
177f5510010SYaroslav Tykhiymeans that the account is temporarily locked out
178f5510010SYaroslav Tykhiyand no one can log into it using any authentication.
179f5510010SYaroslav TykhiyFor a convenient command-line interface to account locking, see
180f5510010SYaroslav Tykhiy.Xr pw 8 .
181f5510010SYaroslav Tykhiy.Pp
182a023c1a6SYaroslav TykhiyThe
183a023c1a6SYaroslav Tykhiy.Ar group
184a023c1a6SYaroslav Tykhiyfield is the group that the user will be placed in upon login.
185248aee62SJacques VidrineSince this system supports multiple groups (see
186afe61c15SRodney W. Grimes.Xr groups 1 )
187248aee62SJacques Vidrinethis field currently has little special meaning.
188afe61c15SRodney W. Grimes.Pp
189afe61c15SRodney W. GrimesThe
190afe61c15SRodney W. Grimes.Ar class
1915203edcdSRuslan Ermilovfield is a key for a user's login class.
1925203edcdSRuslan ErmilovLogin classes
193248aee62SJacques Vidrineare defined in
194408bc30dSDavid Nugent.Xr login.conf 5 ,
195408bc30dSDavid Nugentwhich is a
196afe61c15SRodney W. Grimes.Xr termcap 5
197248aee62SJacques Vidrinestyle database of user attributes, accounting, resource,
198248aee62SJacques Vidrineand environment settings.
199afe61c15SRodney W. Grimes.Pp
200afe61c15SRodney W. GrimesThe
201afe61c15SRodney W. Grimes.Ar change
202248aee62SJacques Vidrinefield is the number of seconds from the epoch,
203248aee62SJacques Vidrine.Dv UTC ,
204248aee62SJacques Vidrineuntil the
205afe61c15SRodney W. Grimespassword for the account must be changed.
206248aee62SJacques VidrineThis field may be left empty to turn off the password aging feature.
207afe61c15SRodney W. Grimes.Pp
208afe61c15SRodney W. GrimesThe
209afe61c15SRodney W. Grimes.Ar expire
210248aee62SJacques Vidrinefield is the number of seconds from the epoch,
211248aee62SJacques Vidrine.Dv UTC ,
212248aee62SJacques Vidrineuntil the
213afe61c15SRodney W. Grimesaccount expires.
214248aee62SJacques VidrineThis field may be left empty to turn off the account aging feature.
215afe61c15SRodney W. Grimes.Pp
216afe61c15SRodney W. GrimesThe
217afe61c15SRodney W. Grimes.Ar gecos
218a023c1a6SYaroslav Tykhiyfield normally contains comma
219a023c1a6SYaroslav Tykhiy.Pq Ql \&,
220a023c1a6SYaroslav Tykhiyseparated subfields as follows:
221afe61c15SRodney W. Grimes.Pp
222a023c1a6SYaroslav Tykhiy.Bl -tag -width ".Ar office" -offset indent -compact
223a023c1a6SYaroslav Tykhiy.It Ar name
2249ec4c09aSGarrett Wollmanuser's full name
225a023c1a6SYaroslav Tykhiy.It Ar office
226248aee62SJacques Vidrineuser's office number
227a023c1a6SYaroslav Tykhiy.It Ar wphone
2289ec4c09aSGarrett Wollmanuser's work phone number
229a023c1a6SYaroslav Tykhiy.It Ar hphone
2309ec4c09aSGarrett Wollmanuser's home phone number
2319ec4c09aSGarrett Wollman.El
232afe61c15SRodney W. Grimes.Pp
233a023c1a6SYaroslav TykhiyThe full
234a023c1a6SYaroslav Tykhiy.Ar name
235*9aae2835SKevin Lomay contain an ampersand
236a023c1a6SYaroslav Tykhiy.Pq Ql &
237a023c1a6SYaroslav Tykhiywhich will be replaced by
238a023c1a6SYaroslav Tykhiythe capitalized login
239a023c1a6SYaroslav Tykhiy.Ar name
240a023c1a6SYaroslav Tykhiywhen the
241a023c1a6SYaroslav Tykhiy.Ar gecos
242a023c1a6SYaroslav Tykhiyfield is displayed or used
243248aee62SJacques Vidrineby various programs such as
244248aee62SJacques Vidrine.Xr finger 1 ,
245248aee62SJacques Vidrine.Xr sendmail 8 ,
246248aee62SJacques Vidrineetc.
247248aee62SJacques Vidrine.Pp
248a023c1a6SYaroslav TykhiyThe
249a023c1a6SYaroslav Tykhiy.Ar office
250a023c1a6SYaroslav Tykhiyand phone number subfields are used by the
251afe61c15SRodney W. Grimes.Xr finger 1
252248aee62SJacques Vidrineprogram, and possibly other applications.
253afe61c15SRodney W. Grimes.Pp
254a023c1a6SYaroslav TykhiyThe user's home directory,
255a023c1a6SYaroslav Tykhiy.Ar home_dir ,
256a023c1a6SYaroslav Tykhiyis the full
257248aee62SJacques Vidrine.Ux
258afe61c15SRodney W. Grimespath name where the user
259afe61c15SRodney W. Grimeswill be placed on login.
260afe61c15SRodney W. Grimes.Pp
261a023c1a6SYaroslav TykhiyThe
262a023c1a6SYaroslav Tykhiy.Ar shell
263a023c1a6SYaroslav Tykhiyfield is the command interpreter the user prefers.
264afe61c15SRodney W. GrimesIf there is nothing in the
265afe61c15SRodney W. Grimes.Ar shell
266afe61c15SRodney W. Grimesfield, the Bourne shell
267afe61c15SRodney W. Grimes.Pq Pa /bin/sh
268afe61c15SRodney W. Grimesis assumed.
269f5510010SYaroslav TykhiyThe conventional way to disable logging into an account once and for all,
270f5510010SYaroslav Tykhiyas it is done for system accounts,
271a023c1a6SYaroslav Tykhiyis to set its
272a023c1a6SYaroslav Tykhiy.Ar shell
273a023c1a6SYaroslav Tykhiyto
274f5510010SYaroslav Tykhiy.Xr nologin 8 .
275248aee62SJacques Vidrine.Sh HESIOD SUPPORT
276248aee62SJacques VidrineIf
27771e3251cSYaroslav Tykhiy.Sq Li dns
278248aee62SJacques Vidrineis specified for the
27971e3251cSYaroslav Tykhiy.Sq Li passwd
280248aee62SJacques Vidrinedatabase in
281248aee62SJacques Vidrine.Xr nsswitch.conf 5 ,
282248aee62SJacques Vidrinethen
283248aee62SJacques Vidrine.Nm
284248aee62SJacques Vidrinelookups occur from the
28571e3251cSYaroslav Tykhiy.Sq Li passwd
286248aee62SJacques VidrineHesiod domain.
287248aee62SJacques Vidrine.Sh NIS SUPPORT
288248aee62SJacques VidrineIf
28971e3251cSYaroslav Tykhiy.Sq Li nis
290248aee62SJacques Vidrineis specified for the
29171e3251cSYaroslav Tykhiy.Sq Li passwd
292248aee62SJacques Vidrinedatabase in
293248aee62SJacques Vidrine.Xr nsswitch.conf 5 ,
294248aee62SJacques Vidrinethen
295248aee62SJacques Vidrine.Nm
296248aee62SJacques Vidrinelookups occur from the
29771e3251cSYaroslav Tykhiy.Sq Li passwd.byname ,
29871e3251cSYaroslav Tykhiy.Sq Li passwd.byuid ,
29971e3251cSYaroslav Tykhiy.Sq Li master.passwd.byname ,
3009ec4c09aSGarrett Wollmanand
30171e3251cSYaroslav Tykhiy.Sq Li master.passwd.byuid
302248aee62SJacques Vidrine.Tn NIS
303dd5527c6SMike Pritchardmaps.
304248aee62SJacques Vidrine.Sh COMPAT SUPPORT
305248aee62SJacques VidrineIf
30671e3251cSYaroslav Tykhiy.Sq Li compat
307248aee62SJacques Vidrineis specified for the
30871e3251cSYaroslav Tykhiy.Sq Li passwd
309248aee62SJacques Vidrinedatabase, and either
31071e3251cSYaroslav Tykhiy.Sq Li dns
311248aee62SJacques Vidrineor
31271e3251cSYaroslav Tykhiy.Sq Li nis
313248aee62SJacques Vidrineis specified for the
31471e3251cSYaroslav Tykhiy.Sq Li passwd_compat
315248aee62SJacques Vidrinedatabase in
316248aee62SJacques Vidrine.Xr nsswitch.conf 5 ,
317248aee62SJacques Vidrinethen the
318248aee62SJacques Vidrine.Nm
319248aee62SJacques Vidrinefile also supports standard
32071e3251cSYaroslav Tykhiy.Sq Li + Ns / Ns Li -
321248aee62SJacques Vidrineexclusions and inclusions, based on user names and netgroups.
322a755ea5bSBill Paul.Pp
323a023c1a6SYaroslav TykhiyLines beginning with a
324a023c1a6SYaroslav Tykhiy.Ql -
325a023c1a6SYaroslav Tykhiy(minus sign) are entries marked as being excluded
326a023c1a6SYaroslav Tykhiyfrom any following inclusions, which are marked with a
327a023c1a6SYaroslav Tykhiy.Ql +
328a023c1a6SYaroslav Tykhiy(plus sign).
329a755ea5bSBill Paul.Pp
330a023c1a6SYaroslav TykhiyIf the second character of the line is a
331a023c1a6SYaroslav Tykhiy.Ql @
332a023c1a6SYaroslav Tykhiy(at sign), the operation
333248aee62SJacques Vidrineinvolves the user fields of all entries in the netgroup specified by the
334248aee62SJacques Vidrineremaining characters of the
335248aee62SJacques Vidrine.Ar name
336248aee62SJacques Vidrinefield.
337248aee62SJacques VidrineOtherwise, the remainder of the
338248aee62SJacques Vidrine.Ar name
339248aee62SJacques Vidrinefield is assumed to be a specific user name.
340a755ea5bSBill Paul.Pp
341a023c1a6SYaroslav TykhiyThe
342a023c1a6SYaroslav Tykhiy.Ql +
343a023c1a6SYaroslav Tykhiytoken may also be alone in the
344248aee62SJacques Vidrine.Ar name
345248aee62SJacques Vidrinefield, which causes all users from either the Hesiod domain
346248aee62SJacques Vidrine.Nm
347248aee62SJacques Vidrine(with
34871e3251cSYaroslav Tykhiy.Sq Li passwd_compat: dns )
349248aee62SJacques Vidrineor
35071e3251cSYaroslav Tykhiy.Sq Li passwd.byname
351a755ea5bSBill Pauland
35271e3251cSYaroslav Tykhiy.Sq Li passwd.byuid
353248aee62SJacques Vidrine.Tn NIS
354248aee62SJacques Vidrinemaps (with
35571e3251cSYaroslav Tykhiy.Sq Li passwd_compat: nis )
356248aee62SJacques Vidrineto be included.
357a755ea5bSBill Paul.Pp
358248aee62SJacques VidrineIf the entry contains non-empty
359248aee62SJacques Vidrine.Ar uid
360248aee62SJacques Vidrineor
361248aee62SJacques Vidrine.Ar gid
362248aee62SJacques Vidrinefields, the specified numbers will override the information retrieved
363248aee62SJacques Vidrinefrom the Hesiod domain or the
364248aee62SJacques Vidrine.Tn NIS
3655203edcdSRuslan Ermilovmaps.
3665203edcdSRuslan ErmilovAs well, if the
367248aee62SJacques Vidrine.Ar gecos ,
368248aee62SJacques Vidrine.Ar dir
369248aee62SJacques Vidrineor
370248aee62SJacques Vidrine.Ar shell
371248aee62SJacques Vidrineentries contain text, it will override the information included via
372248aee62SJacques VidrineHesiod or
373248aee62SJacques Vidrine.Tn NIS .
374248aee62SJacques VidrineOn some systems, the
375248aee62SJacques Vidrine.Ar passwd
376248aee62SJacques Vidrinefield may also be overridden.
377489587c5SDima Dorfman.Sh FILES
378d962d52aSRuslan Ermilov.Bl -tag -width ".Pa /etc/master.passwd" -compact
379489587c5SDima Dorfman.It Pa /etc/passwd
380489587c5SDima Dorfman.Tn ASCII
381489587c5SDima Dorfmanpassword file, with passwords removed
382489587c5SDima Dorfman.It Pa /etc/pwd.db
383c00809fcSDima Dorfman.Xr db 3 Ns -format
384489587c5SDima Dorfmanpassword database, with passwords removed
385489587c5SDima Dorfman.It Pa /etc/master.passwd
386489587c5SDima Dorfman.Tn ASCII
387489587c5SDima Dorfmanpassword file, with passwords intact
388489587c5SDima Dorfman.It Pa /etc/spwd.db
389c00809fcSDima Dorfman.Xr db 3 Ns -format
390489587c5SDima Dorfmanpassword database, with passwords intact
391489587c5SDima Dorfman.El
392afe61c15SRodney W. Grimes.Sh COMPATIBILITY
39321421932SMike PritchardThe password file format has changed since
39421421932SMike Pritchard.Bx 4.3 .
395afe61c15SRodney W. GrimesThe following awk script can be used to convert your old-style password
396afe61c15SRodney W. Grimesfile into a new style password file.
397afe61c15SRodney W. GrimesThe additional fields
398a023c1a6SYaroslav Tykhiy.Ar class ,
399a023c1a6SYaroslav Tykhiy.Ar change
400afe61c15SRodney W. Grimesand
401a023c1a6SYaroslav Tykhiy.Ar expire
402afe61c15SRodney W. Grimesare added, but are turned off by default.
403248aee62SJacques VidrineClass is currently not implemented, but change and expire are; to set them,
404248aee62SJacques Vidrineuse the current day in seconds from the epoch + whatever number of seconds
405248aee62SJacques Vidrineof offset you want.
406afe61c15SRodney W. Grimes.Bd -literal -offset indent
407afe61c15SRodney W. GrimesBEGIN { FS = ":"}
408afe61c15SRodney W. Grimes{ print $1 ":" $2 ":" $3 ":" $4 "::0:0:" $5 ":" $6 ":" $7 }
409afe61c15SRodney W. Grimes.Ed
4109cbda590SRuslan Ermilov.Sh SEE ALSO
4119cbda590SRuslan Ermilov.Xr chpass 1 ,
4129cbda590SRuslan Ermilov.Xr login 1 ,
4139cbda590SRuslan Ermilov.Xr passwd 1 ,
41426605dc1STom Rhodes.Xr crypt 3 ,
4159cbda590SRuslan Ermilov.Xr getpwent 3 ,
4169cbda590SRuslan Ermilov.Xr login.conf 5 ,
4179cbda590SRuslan Ermilov.Xr netgroup 5 ,
41834815be1SYaroslav Tykhiy.Xr nsswitch.conf 5 ,
4199cbda590SRuslan Ermilov.Xr adduser 8 ,
420f5510010SYaroslav Tykhiy.Xr nologin 8 ,
42126605dc1STom Rhodes.Xr pw 8 ,
4229cbda590SRuslan Ermilov.Xr pwd_mkdb 8 ,
4239cbda590SRuslan Ermilov.Xr vipw 8 ,
4249cbda590SRuslan Ermilov.Xr yp 8
4259cbda590SRuslan Ermilov.Pp
4269cbda590SRuslan Ermilov.%T "Managing NFS and NIS"
4279cbda590SRuslan Ermilov(O'Reilly & Associates)
428afe61c15SRodney W. Grimes.Sh HISTORY
429afe61c15SRodney W. GrimesA
430afe61c15SRodney W. Grimes.Nm
431afe61c15SRodney W. Grimesfile format appeared in
432afe61c15SRodney W. Grimes.At v6 .
433248aee62SJacques Vidrine.Pp
434248aee62SJacques VidrineThe
435248aee62SJacques Vidrine.Tn NIS
436248aee62SJacques Vidrine.Nm
437248aee62SJacques Vidrinefile format first appeared in SunOS.
438248aee62SJacques Vidrine.Pp
439248aee62SJacques VidrineThe Hesiod support first appeared in
440248aee62SJacques Vidrine.Fx 4.1 .
441248aee62SJacques VidrineIt was imported from the
442248aee62SJacques Vidrine.Nx
443248aee62SJacques VidrineProject, where it first appeared in
444248aee62SJacques Vidrine.Nx 1.4 .
4459cbda590SRuslan Ermilov.Sh BUGS
4469cbda590SRuslan ErmilovUser information should (and eventually will) be stored elsewhere.
4479cbda590SRuslan Ermilov.Pp
4489cbda590SRuslan ErmilovPlacing
44971e3251cSYaroslav Tykhiy.Sq Li compat
4509cbda590SRuslan Ermilovexclusions in the file after any inclusions will have
4519cbda590SRuslan Ermilovunexpected results.
452