xref: /freebsd/share/man/man5/passwd.5 (revision 97759ccc715c4b365432c16d763c50eecfcb1100)
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.
15dda5b397SEitan Adler.\" 3. Neither the name of the University nor the names of its contributors
16afe61c15SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
17afe61c15SRodney W. Grimes.\"    without specific prior written permission.
18afe61c15SRodney W. Grimes.\"
19afe61c15SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20afe61c15SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21afe61c15SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22afe61c15SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23afe61c15SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24afe61c15SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25afe61c15SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26afe61c15SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27afe61c15SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28afe61c15SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29afe61c15SRodney W. Grimes.\" SUCH DAMAGE.
30afe61c15SRodney W. Grimes.\"
31*6e068d6bSJose Luis Duran.Dd May 16, 2023
32afe61c15SRodney W. Grimes.Dt PASSWD 5
33afe61c15SRodney W. Grimes.Os
34afe61c15SRodney W. Grimes.Sh NAME
35248aee62SJacques Vidrine.Nm passwd ,
3687f49967SMateusz Piotrowski.Nm master.passwd ,
3787f49967SMateusz Piotrowski.Nm pwd.db ,
3887f49967SMateusz Piotrowski.Nm spwd.db
39afe61c15SRodney W. Grimes.Nd format of the password file
40afe61c15SRodney W. Grimes.Sh DESCRIPTION
41afe61c15SRodney W. GrimesThe
424b66483fSRuslan Ermilov.Nm
43248aee62SJacques Vidrinefiles are the local source of password information.
44248aee62SJacques VidrineThey can be used in conjunction with the Hesiod domains
4571e3251cSYaroslav Tykhiy.Sq Li passwd
46248aee62SJacques Vidrineand
4771e3251cSYaroslav Tykhiy.Sq Li uid ,
48248aee62SJacques Vidrineand the
49d047a4e4SJose Luis DuranNIS
50248aee62SJacques Vidrinemaps
5171e3251cSYaroslav Tykhiy.Sq Li passwd.byname ,
5271e3251cSYaroslav Tykhiy.Sq Li passwd.byuid ,
5371e3251cSYaroslav Tykhiy.Sq Li master.passwd.byname ,
54248aee62SJacques Vidrineand
5571e3251cSYaroslav Tykhiy.Sq Li master.passwd.byuid ,
56248aee62SJacques Vidrineas controlled by
57248aee62SJacques Vidrine.Xr nsswitch.conf 5 .
58248aee62SJacques Vidrine.Pp
5926605dc1STom RhodesFor consistency, none of these files should ever be modified
6026605dc1STom Rhodesmanually.
6126605dc1STom Rhodes.Pp
62248aee62SJacques VidrineThe
63248aee62SJacques Vidrine.Nm master.passwd
64248aee62SJacques Vidrinefile is readable only by root, and consists of newline separated
65a023c1a6SYaroslav Tykhiyrecords, one per user, containing ten colon
66a023c1a6SYaroslav Tykhiy.Pq Ql \&:
67a023c1a6SYaroslav Tykhiyseparated
685203edcdSRuslan Ermilovfields.
695203edcdSRuslan ErmilovThese fields are as follows:
70a023c1a6SYaroslav Tykhiy.Bl -tag -width ".Ar password" -offset indent
71a023c1a6SYaroslav Tykhiy.It Ar name
72afe61c15SRodney W. GrimesUser's login name.
73a023c1a6SYaroslav Tykhiy.It Ar password
74afe61c15SRodney W. GrimesUser's
75afe61c15SRodney W. Grimes.Em encrypted
76afe61c15SRodney W. Grimespassword.
77a023c1a6SYaroslav Tykhiy.It Ar uid
78afe61c15SRodney W. GrimesUser's id.
79a023c1a6SYaroslav Tykhiy.It Ar gid
80afe61c15SRodney W. GrimesUser's login group id.
81a023c1a6SYaroslav Tykhiy.It Ar class
82aba0edf2SDaniel HarrisUser's login class.
83a023c1a6SYaroslav Tykhiy.It Ar change
84afe61c15SRodney W. GrimesPassword change time.
85a023c1a6SYaroslav Tykhiy.It Ar expire
86afe61c15SRodney W. GrimesAccount expiration time.
87a023c1a6SYaroslav Tykhiy.It Ar gecos
88afe61c15SRodney W. GrimesGeneral information about the user.
89a023c1a6SYaroslav Tykhiy.It Ar home_dir
90afe61c15SRodney W. GrimesUser's home directory.
91a023c1a6SYaroslav Tykhiy.It Ar shell
92afe61c15SRodney W. GrimesUser's login shell.
93afe61c15SRodney W. Grimes.El
94afe61c15SRodney W. Grimes.Pp
95248aee62SJacques VidrineThe
96248aee62SJacques Vidrine.Nm
97248aee62SJacques Vidrinefile is generated from the
98d722865aSDima Dorfman.Nm master.passwd
99248aee62SJacques Vidrinefile by
100248aee62SJacques Vidrine.Xr pwd_mkdb 8 ,
101a023c1a6SYaroslav Tykhiyhas the
102a023c1a6SYaroslav Tykhiy.Ar class ,
103a023c1a6SYaroslav Tykhiy.Ar change ,
104a023c1a6SYaroslav Tykhiyand
105a023c1a6SYaroslav Tykhiy.Ar expire
106a023c1a6SYaroslav Tykhiyfields removed, and the
107a023c1a6SYaroslav Tykhiy.Ar password
10836cc06ffSGiorgos Keramidasfield replaced by a
10936cc06ffSGiorgos Keramidas.Ql *
11036cc06ffSGiorgos Keramidascharacter.
11122bf9812SWolfram Schneider.Pp
112afe61c15SRodney W. GrimesThe
113afe61c15SRodney W. Grimes.Ar name
114afe61c15SRodney W. Grimesfield is the login used to access the computer account, and the
115afe61c15SRodney W. Grimes.Ar uid
1165203edcdSRuslan Ermilovfield is the number associated with it.
1175203edcdSRuslan ErmilovThey should both be unique
118afe61c15SRodney W. Grimesacross the system (and often across a group of systems) since they
119afe61c15SRodney W. Grimescontrol file access.
120afe61c15SRodney W. Grimes.Pp
121afe61c15SRodney W. GrimesWhile it is possible to have multiple entries with identical login names
1225203edcdSRuslan Ermilovand/or identical user id's, it is usually a mistake to do so.
1235203edcdSRuslan ErmilovRoutines
124afe61c15SRodney W. Grimesthat manipulate these files will often return only one of the multiple
125afe61c15SRodney W. Grimesentries, and that one by random selection.
126afe61c15SRodney W. Grimes.Pp
12718744cd9SWarren BlockThe login name must not begin with a hyphen
12818744cd9SWarren Block.Pq Ql \&- ,
12918744cd9SWarren Blockand cannot contain 8-bit characters, tabs or spaces, or any of these
13018744cd9SWarren Blocksymbols:
131*6e068d6bSJose Luis Duran.Ql \&,:+&#%^\&(\&)!@~*?<>=|\e\\&/"\&; .
13218744cd9SWarren BlockThe dollar symbol
13318744cd9SWarren Block.Pq Ql \&$
13418744cd9SWarren Blockis allowed only as the last character for use with Samba.
1355203edcdSRuslan ErmilovNo field may contain a
136a023c1a6SYaroslav Tykhiycolon
137a023c1a6SYaroslav Tykhiy.Pq Ql \&:
138a023c1a6SYaroslav Tykhiyas this has been used historically to separate the fields
139248aee62SJacques Vidrinein the user database.
140afe61c15SRodney W. Grimes.Pp
14118744cd9SWarren BlockCase is significant.
14218744cd9SWarren BlockLogin names
14318744cd9SWarren Block.Ql Lrrr
14418744cd9SWarren Blockand
14518744cd9SWarren Block.Ql lrrr
14618744cd9SWarren Blockrepresent different users.
14718744cd9SWarren BlockBe aware of this when interoperating with systems that do not have
14818744cd9SWarren Blockcase-sensitive login names.
14918744cd9SWarren Block.Pp
150f5510010SYaroslav TykhiyIn the
151f5510010SYaroslav Tykhiy.Nm master.passwd
152f5510010SYaroslav Tykhiyfile,
153a023c1a6SYaroslav Tykhiythe
154a023c1a6SYaroslav Tykhiy.Ar password
155a023c1a6SYaroslav Tykhiyfield is the
156afe61c15SRodney W. Grimes.Em encrypted
15726605dc1STom Rhodesform of the password, see
15826605dc1STom Rhodes.Xr crypt 3 .
159afe61c15SRodney W. GrimesIf the
160afe61c15SRodney W. Grimes.Ar password
161afe61c15SRodney W. Grimesfield is empty, no password will be required to gain access to the
1625203edcdSRuslan Ermilovmachine.
163f5510010SYaroslav TykhiyThis is almost invariably a mistake, so authentication components
164f5510010SYaroslav Tykhiysuch as PAM can forcibly disallow remote access to passwordless accounts.
165f5510010SYaroslav TykhiyBecause this file contains the encrypted user passwords, it should
166afe61c15SRodney W. Grimesnot be readable by anyone without appropriate privileges.
167afe61c15SRodney W. Grimes.Pp
168f5510010SYaroslav TykhiyA password of
169f5510010SYaroslav Tykhiy.Ql *
170f5510010SYaroslav Tykhiyindicates that
171f5510010SYaroslav Tykhiypassword authentication is disabled for that account
172f5510010SYaroslav Tykhiy(logins through other forms of
173f5510010SYaroslav Tykhiyauthentication, e.g., using
174f5510010SYaroslav Tykhiy.Xr ssh 1
175f5510010SYaroslav Tykhiykeys, will still work).
176f5510010SYaroslav TykhiyThe field only contains encrypted passwords, and
177f5510010SYaroslav Tykhiy.Ql *
178f5510010SYaroslav Tykhiycan never be the result of encrypting a password.
179f5510010SYaroslav Tykhiy.Pp
180f5510010SYaroslav TykhiyAn encrypted password prefixed by
181f5510010SYaroslav Tykhiy.Ql *LOCKED*
182f5510010SYaroslav Tykhiymeans that the account is temporarily locked out
183f5510010SYaroslav Tykhiyand no one can log into it using any authentication.
184f5510010SYaroslav TykhiyFor a convenient command-line interface to account locking, see
185f5510010SYaroslav Tykhiy.Xr pw 8 .
186f5510010SYaroslav Tykhiy.Pp
187a023c1a6SYaroslav TykhiyThe
188a023c1a6SYaroslav Tykhiy.Ar group
189a023c1a6SYaroslav Tykhiyfield is the group that the user will be placed in upon login.
190248aee62SJacques VidrineSince this system supports multiple groups (see
191afe61c15SRodney W. Grimes.Xr groups 1 )
192248aee62SJacques Vidrinethis field currently has little special meaning.
193afe61c15SRodney W. Grimes.Pp
194afe61c15SRodney W. GrimesThe
195afe61c15SRodney W. Grimes.Ar class
1965203edcdSRuslan Ermilovfield is a key for a user's login class.
1975203edcdSRuslan ErmilovLogin classes
198248aee62SJacques Vidrineare defined in
199408bc30dSDavid Nugent.Xr login.conf 5 ,
200408bc30dSDavid Nugentwhich is a
201afe61c15SRodney W. Grimes.Xr termcap 5
202248aee62SJacques Vidrinestyle database of user attributes, accounting, resource,
203248aee62SJacques Vidrineand environment settings.
204afe61c15SRodney W. Grimes.Pp
205afe61c15SRodney W. GrimesThe
206afe61c15SRodney W. Grimes.Ar change
207248aee62SJacques Vidrinefield is the number of seconds from the epoch,
208248aee62SJacques Vidrine.Dv UTC ,
209248aee62SJacques Vidrineuntil the
210afe61c15SRodney W. Grimespassword for the account must be changed.
211ca434adfSBenjamin KadukThis field may be left empty to turn off the password aging feature;
212ca434adfSBenjamin Kaduka value of zero is equivalent to leaving the field empty.
213afe61c15SRodney W. Grimes.Pp
214afe61c15SRodney W. GrimesThe
215afe61c15SRodney W. Grimes.Ar expire
216248aee62SJacques Vidrinefield is the number of seconds from the epoch,
217248aee62SJacques Vidrine.Dv UTC ,
218248aee62SJacques Vidrineuntil the
219afe61c15SRodney W. Grimesaccount expires.
220ca434adfSBenjamin KadukThis field may be left empty to turn off the account aging feature;
221ca434adfSBenjamin Kaduka value of zero is equivalent to leaving the field empty.
222afe61c15SRodney W. Grimes.Pp
223afe61c15SRodney W. GrimesThe
224afe61c15SRodney W. Grimes.Ar gecos
225a023c1a6SYaroslav Tykhiyfield normally contains comma
226a023c1a6SYaroslav Tykhiy.Pq Ql \&,
227a023c1a6SYaroslav Tykhiyseparated subfields as follows:
228afe61c15SRodney W. Grimes.Pp
229a023c1a6SYaroslav Tykhiy.Bl -tag -width ".Ar office" -offset indent -compact
230a023c1a6SYaroslav Tykhiy.It Ar name
2319ec4c09aSGarrett Wollmanuser's full name
232a023c1a6SYaroslav Tykhiy.It Ar office
233248aee62SJacques Vidrineuser's office number
234a023c1a6SYaroslav Tykhiy.It Ar wphone
2359ec4c09aSGarrett Wollmanuser's work phone number
236a023c1a6SYaroslav Tykhiy.It Ar hphone
2379ec4c09aSGarrett Wollmanuser's home phone number
2389ec4c09aSGarrett Wollman.El
239afe61c15SRodney W. Grimes.Pp
240a023c1a6SYaroslav TykhiyThe full
241a023c1a6SYaroslav Tykhiy.Ar name
2429aae2835SKevin Lomay contain an ampersand
243a023c1a6SYaroslav Tykhiy.Pq Ql &
244a023c1a6SYaroslav Tykhiywhich will be replaced by
245a023c1a6SYaroslav Tykhiythe capitalized login
246a023c1a6SYaroslav Tykhiy.Ar name
247a023c1a6SYaroslav Tykhiywhen the
248a023c1a6SYaroslav Tykhiy.Ar gecos
249a023c1a6SYaroslav Tykhiyfield is displayed or used
250248aee62SJacques Vidrineby various programs such as
251248aee62SJacques Vidrine.Xr finger 1 ,
252248aee62SJacques Vidrine.Xr sendmail 8 ,
253248aee62SJacques Vidrineetc.
254248aee62SJacques Vidrine.Pp
255a023c1a6SYaroslav TykhiyThe
256a023c1a6SYaroslav Tykhiy.Ar office
257a023c1a6SYaroslav Tykhiyand phone number subfields are used by the
258afe61c15SRodney W. Grimes.Xr finger 1
259248aee62SJacques Vidrineprogram, and possibly other applications.
260afe61c15SRodney W. Grimes.Pp
261a023c1a6SYaroslav TykhiyThe user's home directory,
262a023c1a6SYaroslav Tykhiy.Ar home_dir ,
263a023c1a6SYaroslav Tykhiyis the full
264248aee62SJacques Vidrine.Ux
265afe61c15SRodney W. Grimespath name where the user
266afe61c15SRodney W. Grimeswill be placed on login.
267afe61c15SRodney W. Grimes.Pp
268a023c1a6SYaroslav TykhiyThe
269a023c1a6SYaroslav Tykhiy.Ar shell
270a023c1a6SYaroslav Tykhiyfield is the command interpreter the user prefers.
271afe61c15SRodney W. GrimesIf there is nothing in the
272afe61c15SRodney W. Grimes.Ar shell
273afe61c15SRodney W. Grimesfield, the Bourne shell
274afe61c15SRodney W. Grimes.Pq Pa /bin/sh
275afe61c15SRodney W. Grimesis assumed.
276f5510010SYaroslav TykhiyThe conventional way to disable logging into an account once and for all,
277f5510010SYaroslav Tykhiyas it is done for system accounts,
278a023c1a6SYaroslav Tykhiyis to set its
279a023c1a6SYaroslav Tykhiy.Ar shell
280a023c1a6SYaroslav Tykhiyto
281ca434adfSBenjamin Kaduk.Pa /sbin/nologin
282ca434adfSBenjamin Kaduk.Pq see Xr nologin 8 .
283248aee62SJacques Vidrine.Sh HESIOD SUPPORT
284248aee62SJacques VidrineIf
28571e3251cSYaroslav Tykhiy.Sq Li dns
286248aee62SJacques Vidrineis specified for the
28771e3251cSYaroslav Tykhiy.Sq Li passwd
288248aee62SJacques Vidrinedatabase in
289248aee62SJacques Vidrine.Xr nsswitch.conf 5 ,
290248aee62SJacques Vidrinethen
291248aee62SJacques Vidrine.Nm
292248aee62SJacques Vidrinelookups occur from the
29371e3251cSYaroslav Tykhiy.Sq Li passwd
294248aee62SJacques VidrineHesiod domain.
295248aee62SJacques Vidrine.Sh NIS SUPPORT
296248aee62SJacques VidrineIf
29771e3251cSYaroslav Tykhiy.Sq Li nis
298248aee62SJacques Vidrineis specified for the
29971e3251cSYaroslav Tykhiy.Sq Li passwd
300248aee62SJacques Vidrinedatabase in
301248aee62SJacques Vidrine.Xr nsswitch.conf 5 ,
302248aee62SJacques Vidrinethen
303248aee62SJacques Vidrine.Nm
304248aee62SJacques Vidrinelookups occur from the
30571e3251cSYaroslav Tykhiy.Sq Li passwd.byname ,
30671e3251cSYaroslav Tykhiy.Sq Li passwd.byuid ,
30771e3251cSYaroslav Tykhiy.Sq Li master.passwd.byname ,
3089ec4c09aSGarrett Wollmanand
30971e3251cSYaroslav Tykhiy.Sq Li master.passwd.byuid
310d047a4e4SJose Luis DuranNIS
311dd5527c6SMike Pritchardmaps.
312248aee62SJacques Vidrine.Sh COMPAT SUPPORT
313248aee62SJacques VidrineIf
31471e3251cSYaroslav Tykhiy.Sq Li compat
315248aee62SJacques Vidrineis specified for the
31671e3251cSYaroslav Tykhiy.Sq Li passwd
317248aee62SJacques Vidrinedatabase, and either
31871e3251cSYaroslav Tykhiy.Sq Li dns
319248aee62SJacques Vidrineor
32071e3251cSYaroslav Tykhiy.Sq Li nis
321248aee62SJacques Vidrineis specified for the
32271e3251cSYaroslav Tykhiy.Sq Li passwd_compat
323248aee62SJacques Vidrinedatabase in
324248aee62SJacques Vidrine.Xr nsswitch.conf 5 ,
325248aee62SJacques Vidrinethen the
326248aee62SJacques Vidrine.Nm
327248aee62SJacques Vidrinefile also supports standard
32871e3251cSYaroslav Tykhiy.Sq Li + Ns / Ns Li -
329248aee62SJacques Vidrineexclusions and inclusions, based on user names and netgroups.
330a755ea5bSBill Paul.Pp
331a023c1a6SYaroslav TykhiyLines beginning with a
332a023c1a6SYaroslav Tykhiy.Ql -
333a023c1a6SYaroslav Tykhiy(minus sign) are entries marked as being excluded
334a023c1a6SYaroslav Tykhiyfrom any following inclusions, which are marked with a
335a023c1a6SYaroslav Tykhiy.Ql +
336a023c1a6SYaroslav Tykhiy(plus sign).
337a755ea5bSBill Paul.Pp
338a023c1a6SYaroslav TykhiyIf the second character of the line is a
339a023c1a6SYaroslav Tykhiy.Ql @
340a023c1a6SYaroslav Tykhiy(at sign), the operation
341248aee62SJacques Vidrineinvolves the user fields of all entries in the netgroup specified by the
342248aee62SJacques Vidrineremaining characters of the
343248aee62SJacques Vidrine.Ar name
344248aee62SJacques Vidrinefield.
345248aee62SJacques VidrineOtherwise, the remainder of the
346248aee62SJacques Vidrine.Ar name
347248aee62SJacques Vidrinefield is assumed to be a specific user name.
348a755ea5bSBill Paul.Pp
349a023c1a6SYaroslav TykhiyThe
350a023c1a6SYaroslav Tykhiy.Ql +
351a023c1a6SYaroslav Tykhiytoken may also be alone in the
352248aee62SJacques Vidrine.Ar name
353248aee62SJacques Vidrinefield, which causes all users from either the Hesiod domain
354248aee62SJacques Vidrine.Nm
355248aee62SJacques Vidrine(with
35671e3251cSYaroslav Tykhiy.Sq Li passwd_compat: dns )
357248aee62SJacques Vidrineor
35871e3251cSYaroslav Tykhiy.Sq Li passwd.byname
359a755ea5bSBill Pauland
36071e3251cSYaroslav Tykhiy.Sq Li passwd.byuid
361d047a4e4SJose Luis DuranNIS
362248aee62SJacques Vidrinemaps (with
36371e3251cSYaroslav Tykhiy.Sq Li passwd_compat: nis )
364248aee62SJacques Vidrineto be included.
365a755ea5bSBill Paul.Pp
366248aee62SJacques VidrineIf the entry contains non-empty
367248aee62SJacques Vidrine.Ar uid
368248aee62SJacques Vidrineor
369248aee62SJacques Vidrine.Ar gid
370248aee62SJacques Vidrinefields, the specified numbers will override the information retrieved
371248aee62SJacques Vidrinefrom the Hesiod domain or the
372d047a4e4SJose Luis DuranNIS
3735203edcdSRuslan Ermilovmaps.
374ca434adfSBenjamin KadukLikewise, if the
375248aee62SJacques Vidrine.Ar gecos ,
376248aee62SJacques Vidrine.Ar dir
377248aee62SJacques Vidrineor
378248aee62SJacques Vidrine.Ar shell
379248aee62SJacques Vidrineentries contain text, it will override the information included via
380248aee62SJacques VidrineHesiod or
381d047a4e4SJose Luis DuranNIS .
382248aee62SJacques VidrineOn some systems, the
383248aee62SJacques Vidrine.Ar passwd
384248aee62SJacques Vidrinefield may also be overridden.
385489587c5SDima Dorfman.Sh FILES
386d962d52aSRuslan Ermilov.Bl -tag -width ".Pa /etc/master.passwd" -compact
387489587c5SDima Dorfman.It Pa /etc/passwd
388d047a4e4SJose Luis DuranASCII
389489587c5SDima Dorfmanpassword file, with passwords removed
390489587c5SDima Dorfman.It Pa /etc/pwd.db
391c00809fcSDima Dorfman.Xr db 3 Ns -format
392489587c5SDima Dorfmanpassword database, with passwords removed
393489587c5SDima Dorfman.It Pa /etc/master.passwd
394d047a4e4SJose Luis DuranASCII
395489587c5SDima Dorfmanpassword file, with passwords intact
396489587c5SDima Dorfman.It Pa /etc/spwd.db
397c00809fcSDima Dorfman.Xr db 3 Ns -format
398489587c5SDima Dorfmanpassword database, with passwords intact
399489587c5SDima Dorfman.El
400afe61c15SRodney W. Grimes.Sh COMPATIBILITY
40121421932SMike PritchardThe password file format has changed since
40221421932SMike Pritchard.Bx 4.3 .
403afe61c15SRodney W. GrimesThe following awk script can be used to convert your old-style password
404afe61c15SRodney W. Grimesfile into a new style password file.
405afe61c15SRodney W. GrimesThe additional fields
406a023c1a6SYaroslav Tykhiy.Ar class ,
407a023c1a6SYaroslav Tykhiy.Ar change
408afe61c15SRodney W. Grimesand
409a023c1a6SYaroslav Tykhiy.Ar expire
410ca434adfSBenjamin Kadukare added, but are turned off by default
411ca434adfSBenjamin Kaduk.Pq setting these fields to zero is equivalent to leaving them blank .
412248aee62SJacques VidrineClass is currently not implemented, but change and expire are; to set them,
413248aee62SJacques Vidrineuse the current day in seconds from the epoch + whatever number of seconds
414248aee62SJacques Vidrineof offset you want.
415afe61c15SRodney W. Grimes.Bd -literal -offset indent
416afe61c15SRodney W. GrimesBEGIN { FS = ":"}
417afe61c15SRodney W. Grimes{ print $1 ":" $2 ":" $3 ":" $4 "::0:0:" $5 ":" $6 ":" $7 }
418afe61c15SRodney W. Grimes.Ed
4199cbda590SRuslan Ermilov.Sh SEE ALSO
4209cbda590SRuslan Ermilov.Xr chpass 1 ,
4219cbda590SRuslan Ermilov.Xr login 1 ,
4229cbda590SRuslan Ermilov.Xr passwd 1 ,
42326605dc1STom Rhodes.Xr crypt 3 ,
4249cbda590SRuslan Ermilov.Xr getpwent 3 ,
4259cbda590SRuslan Ermilov.Xr login.conf 5 ,
4269cbda590SRuslan Ermilov.Xr netgroup 5 ,
42734815be1SYaroslav Tykhiy.Xr nsswitch.conf 5 ,
4289cbda590SRuslan Ermilov.Xr adduser 8 ,
429f5510010SYaroslav Tykhiy.Xr nologin 8 ,
43026605dc1STom Rhodes.Xr pw 8 ,
4319cbda590SRuslan Ermilov.Xr pwd_mkdb 8 ,
4329cbda590SRuslan Ermilov.Xr vipw 8 ,
4339cbda590SRuslan Ermilov.Xr yp 8
4349cbda590SRuslan Ermilov.Pp
4359cbda590SRuslan Ermilov.%T "Managing NFS and NIS"
4369cbda590SRuslan Ermilov(O'Reilly & Associates)
437afe61c15SRodney W. Grimes.Sh HISTORY
438afe61c15SRodney W. GrimesA
439afe61c15SRodney W. Grimes.Nm
440f4d7986cSJason Helfmanfile format first appeared in
441f4d7986cSJason Helfman.At v1 .
442248aee62SJacques Vidrine.Pp
443248aee62SJacques VidrineThe
444d047a4e4SJose Luis DuranNIS
445248aee62SJacques Vidrine.Nm
446248aee62SJacques Vidrinefile format first appeared in SunOS.
447248aee62SJacques Vidrine.Pp
448248aee62SJacques VidrineThe Hesiod support first appeared in
449248aee62SJacques Vidrine.Fx 4.1 .
450248aee62SJacques VidrineIt was imported from the
451248aee62SJacques Vidrine.Nx
452248aee62SJacques VidrineProject, where it first appeared in
453248aee62SJacques Vidrine.Nx 1.4 .
4549cbda590SRuslan Ermilov.Sh BUGS
4559cbda590SRuslan ErmilovUser information should (and eventually will) be stored elsewhere.
4569cbda590SRuslan Ermilov.Pp
4579cbda590SRuslan ErmilovPlacing
45871e3251cSYaroslav Tykhiy.Sq Li compat
4599cbda590SRuslan Ermilovexclusions in the file after any inclusions will have
4609cbda590SRuslan Ermilovunexpected results.
461