* Add support for gb18030 encoding.
[dragonfly.git] / share / man / man5 / passwd.5
1 .\" Copyright (c) 1988, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     From: @(#)passwd.5      8.1 (Berkeley) 6/5/93
33 .\" $FreeBSD: src/share/man/man5/passwd.5,v 1.26.2.5 2002/02/01 15:51:18 ru Exp $
34 .\" $DragonFly: src/share/man/man5/passwd.5,v 1.2 2003/06/17 04:37:00 dillon Exp $
35 .\"
36 .Dd September 29, 1994
37 .Dt PASSWD 5
38 .Os
39 .Sh NAME
40 .Nm passwd
41 .Nd format of the password file
42 .Sh DESCRIPTION
43 The
44 .Nm
45 files are files consisting of newline separated records, one per user,
46 containing ten colon
47 .Pq Ql \&:
48 separated fields.  These fields are as
49 follows:
50 .Pp
51 .Bl -tag -width password -offset indent
52 .It name
53 User's login name.
54 .It password
55 User's
56 .Em encrypted
57 password.
58 .It uid
59 User's id.
60 .It gid
61 User's login group id.
62 .It class
63 User's login class.
64 .It change
65 Password change time.
66 .It expire
67 Account expiration time.
68 .It gecos
69 General information about the user.
70 .It home_dir
71 User's home directory.
72 .It shell
73 User's login shell.
74 .El
75 .Pp
76 Lines whose first non-whitespace character is a pound-sign (#)
77 are comments, and are ignored.  Blank lines which consist
78 only of spaces, tabs or newlines are also ignored.
79 .Pp
80 The
81 .Ar name
82 field is the login used to access the computer account, and the
83 .Ar uid
84 field is the number associated with it.  They should both be unique
85 across the system (and often across a group of systems) since they
86 control file access.
87 .Pp
88 While it is possible to have multiple entries with identical login names
89 and/or identical uids, it is usually a mistake to do so.  Routines
90 that manipulate these files will often return only one of the multiple
91 entries, and that one by random selection.
92 .Pp
93 The login name must never begin with a hyphen
94 .Pq Ql \&- ;
95 also, it is strongly
96 suggested that neither upper-case characters nor dots
97 .Pq Ql \&.
98 be part
99 of the name, as this tends to confuse mailers.
100 .Pp
101 The password field is the
102 .Em encrypted
103 form of the password.
104 If the
105 .Ar password
106 field is empty, no password will be required to gain access to the
107 machine.  This is almost invariably a mistake.
108 Because these files contain the encrypted user passwords, they should
109 not be readable by anyone without appropriate privileges.
110 Administrative accounts have a password field containing an asterisk
111 .Ql \&*
112 which disallows normal logins.
113 .Pp
114 The group field is the group that the user will be placed in upon login.
115 Although this system supports multiple groups (see
116 .Xr groups 1 )
117 this field indicates the user's primary group.
118 Secondary group memberships are selected in
119 .Pa /etc/group .
120 .Pp
121 The
122 .Ar class
123 field is a key for a user's login class.
124 Login classes are defined in
125 .Xr login.conf 5 ,
126 which is a
127 .Xr termcap 5
128 style database of user attributes, accounting, resource and
129 environment settings.
130 .Pp
131 The
132 .Ar change
133 field is the number in seconds,
134 .Dv GMT ,
135 from the epoch, until the
136 password for the account must be changed.
137 This field may be left empty or set to 0 to turn off the
138 password aging feature.
139 .Pp
140 The
141 .Ar expire
142 field is the number in seconds,
143 .Dv GMT ,
144 from the epoch, until the
145 account expires.
146 This field may be left empty or set to 0 to turn off the account
147 aging feature.
148 .Pp
149 The
150 .Ar gecos
151 field normally contains comma
152 .Pq Ql \&,
153 separated subfields as follows:
154 .Pp
155 .Bl -bullet -compact -offset indent
156 .It
157 user's full name
158 .It
159 user's office location
160 .It
161 user's work phone number
162 .It
163 user's home phone number
164 .El
165 .Pp
166 This information is used by the
167 .Xr finger 1
168 program, and the first field used by the system mailer.
169 If an ampersand
170 .Pq Ql \&&
171 character appears within the fullname field, programs that
172 use this field will substitute it with a capitalized version
173 of the account's login name.
174 .Pp
175 The user's home directory is the full
176 .Tn UNIX
177 path name where the user
178 will be placed on login.
179 .Pp
180 The shell field is the command interpreter the user prefers.
181 If there is nothing in the
182 .Ar shell
183 field, the Bourne shell
184 .Pq Pa /bin/sh
185 is assumed.
186 For security reasons, if the shell is set to a script that disallows
187 access to the system (the
188 .Xr nologin 8
189 script, for example), care should be taken not to import any environment
190 variables.  With
191 .Xr sh 1 ,
192 this can be done by specifying the
193 .Fl p
194 flag.
195 Check the specific shell documentation to determine how this is
196 done with other shells.
197 .Sh YP/NIS INTERACTION
198 .Ss Enabling access to NIS passwd data
199 The system administrator can configure
200 .Tn FreeBSD
201 to use NIS/YP for
202 its password information by adding special records to the
203 .Pa /etc/master.passwd
204 file.
205 These entries should be added with
206 .Xr vipw 8
207 so that the changes can be properly merged with the hashed
208 password databases and the
209 .Pa /etc/passwd
210 file (
211 .Pa /etc/passwd
212 should never be edited manually). Alternatively, the administrator
213 can modify
214 .Pa /etc/master.passwd
215 in some other way and then manually update the password databases with
216 .Xr pwd_mkdb 8 .
217 .Pp
218 The simplest way to activate NIS is to add an empty record
219 with only a plus sign
220 .Pq Ql \&+
221 in the name field, such as this:
222 .Bd -literal -offset indent
223 +:::::::::
224
225 .Ed
226 The
227 .Ql \&+
228 will tell the
229 .Xr getpwent 3
230 routines in
231 .Tn FreeBSD Ns 's
232 standard C library to begin using the NIS passwd maps
233 for lookups.
234 .Pp
235 Note that the entry shown above is known as a
236 .Em wildcard
237 entry, because it matches all users (the
238 .Ql \&+
239 without any other information
240 matches everybody) and allows all NIS password data to be retrieved
241 unaltered.
242 However, by
243 specifying a username or netgroup next to the
244 .Ql \&+
245 in the NIS
246 entry, the administrator can affect what data are extracted from the
247 NIS passwd maps and how it is interpreted.
248 Here are a few example
249 records that illustrate this feature (note that you can have several
250 NIS entries in a single
251 .Pa master.passwd
252 file):
253 .Bd -literal -offset indent
254 -mitnick:::::::::
255 +@staff:::::::::
256 +@permitted-users:::::::::
257 +dennis:::::::::
258 +ken:::::::::/bin/csh
259 +@rejected-users::32767:32767::::::/bin/false
260
261 .Ed
262 Specific usernames are listed explicitly while netgroups are signified
263 by a preceding
264 .Ql \&@ .
265 In the above example, users in the
266 .Dq staff
267 and
268 .Dq permitted-users
269 netgroups will have their password information
270 read from NIS and used unaltered.
271 In other words, they will be allowed
272 normal access to the machine.
273 Users
274 .Dq ken
275 and
276 .Dq dennis ,
277 who have
278 been named explicitly rather than through a netgroup, will also have
279 their password data read from NIS,
280 .Em except
281 that user
282 .Dq ken
283 will have his shell remapped to
284 .Pa /bin/csh .
285 This means that value for his shell specified in the NIS password map
286 will be overridden by the value specified in the special NIS entry in
287 the local
288 .Pa master.passwd
289 file.
290 User
291 .Dq ken
292 may have been assigned the csh shell because his
293 NIS password entry specified a different shell that may not be
294 installed on the client machine for political or technical reasons.
295 Meanwhile, users in the
296 .Dq rejected-users
297 netgroup are prevented
298 from logging in because their UIDs, GIDs and shells have been overridden
299 with invalid values.
300 .Pp
301 User
302 .Dq mitnick
303 will be be ignored entirely because his entry is
304 specified with a
305 .Ql \&-
306 instead of a
307 .Ql \&+ .
308 A minus entry can be used
309 to block out certain NIS password entries completely; users whose
310 password data has been excluded in this way are not recognized by
311 the system at all.
312 (Any overrides specified with minus entries are
313 also ignored since there is no point in processing override information
314 for a user that the system isn't going to recognize in the first place.)
315 In general, a minus entry is used to specifically exclude a user
316 who might otherwise be granted access because he happens to be a
317 member of an authorized netgroup.
318 For example, if
319 .Dq mitnick
320 is
321 a member of the
322 .Dq permitted-users
323 netgroup and must, for whatever
324 the reason, be permitted to remain in that netgroup (possibly to
325 retain access to other machines within the domain), the administrator
326 can still deny him access to a particular system with a minus entry.
327 Also, it is sometimes easier to explicitly list those users who are not
328 allowed access rather than generate a possibly complicated list of
329 users who are allowed access and omit the rest.
330 .Pp
331 Note that the plus and minus entries are evaluated in order from
332 first to last with the first match taking precedence.
333 This means
334 the system will only use the first entry that matches a particular user.
335 If, using the same example, there is a user
336 .Dq foo
337 who is a member of both the
338 .Dq staff
339 netgroup and the
340 .Dq rejected-users
341 netgroup, he will be admitted to
342 the system because the above example lists the entry for
343 .Dq staff
344 before the entry for
345 .Dq rejected-users .
346 If the order were reversed,
347 user
348 .Dq foo
349 would be flagged as a
350 .Dq rejected-user
351 instead and denied access.
352 .Pp
353 Lastly, any NIS password database records that do not match against
354 at least one of the users or netgroups specified by the NIS access
355 entries in the
356 .Pa /etc/master.passwd
357 file will be ignored (along with any users specified using minus
358 entries). In our example shown above, we do not have a wildcard
359 entry at the end of the list; therefore, the system will not recognize
360 anyone except
361 .Dq ken ,
362 .Dq dennis ,
363 the
364 .Dq staff
365 netgroup, and the
366 .Dq permitted-users
367 netgroup as authorized users.
368 The
369 .Dq rejected-users
370 netgroup will
371 be recognized but all members will have their shells remapped and
372 therefore be denied access.
373 All other NIS password records
374 will be ignored.
375 The administrator may add a wildcard entry to the
376 end of the list such as:
377 .Bd -literal -offset indent
378 +:::::::::/sbin/nologin
379
380 .Ed
381 This entry acts as a catch-all for all users that don't match against
382 any of the other entries.
383 This technique is sometimes useful when it is
384 desirable to have the system be able to recognize all users in a
385 particular NIS domain without necessarily granting them login access.
386 See the description of the shell field regarding security concerns when using
387 a shell script as the login shell.
388 .Pp
389 The primary use of this
390 .Pa override
391 feature is to permit the administrator
392 to enforce access restrictions on NIS client systems.
393 Users can be
394 granted access to one group of machines and denied access to other
395 machines simply by adding or removing them from a particular netgroup.
396 Since the netgroup database can also be accessed via NIS, this allows
397 access restrictions to be administered from a single location, namely
398 the NIS master server; once a host's access list has been set in
399 .Pa /etc/master.passwd ,
400 it need not be modified again unless new netgroups are created.
401 .Sh NOTES
402 .Ss Shadow passwords through NIS
403 .Tn FreeBSD
404 uses a shadow password scheme: users' encrypted passwords
405 are stored only in
406 .Pa /etc/master.passwd
407 and
408 .Pa /etc/spwd.db ,
409 which are readable and writable only by the superuser.
410 This is done
411 to prevent users from running the encrypted passwords through
412 password-guessing programs and gaining unauthorized access to
413 other users' accounts.
414 NIS does not support a standard means of
415 password shadowing, which implies that placing your password data
416 into the NIS passwd maps totally defeats the security of
417 .Tn FreeBSD Ns 's
418 password shadowing system.
419 .Pp
420 .Tn FreeBSD
421 provides a few special features to help get around this
422 problem.
423 It is possible to implement password shadowing between
424 .Tn FreeBSD
425 NIS clients and
426 .Tn FreeBSD
427 NIS servers.
428 The
429 .Xr getpwent 3
430 routines will search for a
431 .Pa master.passwd.byname
432 and
433 .Pa master.passwd.byuid
434 maps which should contain the same data found in the
435 .Pa /etc/master.passwd
436 file.
437 If the maps exist,
438 .Tn FreeBSD
439 will attempt to use them for user
440 authentication instead of the standard
441 .Pa passwd.byname
442 and
443 .Pa passwd.byuid
444 maps.
445 .Tn FreeBSD Ns 's
446 .Xr ypserv 8
447 will also check client requests to make sure they originate on a
448 privileged port.
449 Since only the superuser is allowed to bind to
450 a privileged port, the server can tell if the requesting user
451 is the superuser; all requests from non-privileged users to access
452 the
453 .Pa master.passwd
454 maps will be refused.
455 Since all user authentication programs run
456 with superuser privilege, they should have the required access to
457 users' encrypted password data while normal users will only
458 be allowed access to the standard
459 .Pa passwd
460 maps which contain no password information.
461 .Pp
462 Note that this feature cannot be used in an environment with
463 .No non- Ns Tn FreeBSD
464 systems.
465 Note also that a truly determined user with
466 unrestricted access to your network could still compromise the
467 .Pa master.passwd
468 maps.
469 .Ss UID and GID remapping with NIS overrides
470 Unlike
471 .Tn SunOS
472 and other operating systems that use Sun's NIS code,
473 .Tn FreeBSD
474 allows the user to override
475 .Pa all
476 of the fields in a user's NIS
477 .Pa passwd
478 entry.
479 For example, consider the following
480 .Pa /etc/master.passwd
481 entry:
482 .Bd -literal -offset indent
483 +@foo-users:???:666:666:0:0:0:Bogus user:/home/bogus:/bin/bogus
484
485 .Ed
486 This entry will cause all users in the `foo-users' netgroup to
487 have
488 .Pa all
489 of their password information overridden, including UIDs,
490 GIDs and passwords.
491 The result is that all `foo-users' will be
492 locked out of the system, since their passwords will be remapped
493 to invalid values.
494 .Pp
495 This is important to remember because most people are accustomed to
496 using an NIS wildcard entry that looks like this:
497 .Bd -literal -offset indent
498 +:*:0:0:::
499
500 .Ed
501 This often leads to new
502 .Tn FreeBSD
503 administrators choosing NIS entries for their
504 .Pa master.passwd
505 files that look like this:
506 .Bd -literal -offset indent
507 +:*:0:0::::::
508
509 .Ed
510 Or worse, this
511 .Bd -literal -offset indent
512 +::0:0::::::
513
514 .Ed
515 .Sy DO _NOT_ PUT ENTRIES LIKE THIS IN YOUR
516 .Pa master.passwd
517 .Sy FILE!!
518 The first tells
519 .Tn FreeBSD
520 to remap all passwords to
521 .Ql \&*
522 (which
523 will prevent anybody from logging in) and to remap all UIDs and GIDs
524 to 0 (which will make everybody appear to be the superuser). The
525 second case just maps all UIDs and GIDs to 0, which means that
526 all users will appear to be root!
527 .Pp
528 .Ss Compatibility of NIS override evaluation
529 When Sun originally added NIS support to their
530 .Xr getpwent 3
531 routines, they took into account the fact that the
532 .Tn SunOS
533 password
534 .Pa /etc/passwd
535 file is in plain
536 .Tn ASCII
537 format.
538 The
539 .Tn SunOS
540 documentation claims that
541 adding a
542 .Ql \&+
543 entry to the password file causes the contents of
544 the NIS password database to be
545 .Dq inserted
546 at the position in the file where the
547 .Ql \&+
548 entry appears.
549 If, for example, the
550 administrator places a
551 .Ql \&+::::::
552 entry in the middle of
553 .Pa /etc/passwd ,
554 then the entire contents of the NIS password map would appear
555 as though it had been copied into the middle of the password
556 file.
557 If the administrator places
558 .Ql \&+::::::
559 entries at both the middle and the end of
560 .Pa /etc/passwd ,
561 then the NIS password map would appear twice: once in the middle
562 of the file and once at the end.
563 (By using override entries
564 instead of simple wildcards, other combinations could be achieved.)
565 .Pp
566 By contrast,
567 .Fx
568 does not have a single
569 .Tn ASCII
570 password file: it
571 has a hashed password database.
572 This database does not have an
573 easily-defined beginning, middle or end, which makes it very hard
574 to design a scheme that is 100% compatible with
575 .Tn SunOS .
576 For example,
577 the
578 .Fn getpwnam
579 and
580 .Fn getpwuid
581 functions in
582 .Tn FreeBSD
583 are designed to do direct queries to the
584 hash database rather than a linear search.
585 This approach is faster
586 on systems where the password database is large.
587 However, when
588 using direct database queries, the system does not know or care
589 about the order of the original password file, and therefore
590 it cannot easily apply the same override logic used by
591 .Tn SunOS .
592 .Pp
593 Instead,
594 .Tn FreeBSD
595 groups all the NIS override entries together
596 and constructs a filter out of them.
597 Each NIS password entry
598 is compared against the override filter exactly once and
599 treated accordingly: if the filter allows the entry through
600 unaltered, it's treated unaltered; if the filter calls for remapping
601 of fields, then fields are remapped; if the filter calls for
602 explicit exclusion (i.e., the entry matches a
603 .Ql \&-
604 override), the entry is ignored; if the entry doesn't match against any
605 of the filter specifications, it's discarded.
606 .Pp
607 Again, note that the NIS
608 .Ql \&+
609 and
610 .Ql \&-
611 entries themselves are handled in the order in which they were specified
612 in the
613 .Pa /etc/master.passwd
614 file, since doing otherwise would lead to unpredictable behavior.
615 .Pp
616 The end result is that
617 .Tn FreeBSD Ns 's
618 provides a very close approximation
619 of
620 .Tn SunOS Ns 's
621 behavior while maintaining the database paradigm, though the
622 .Xr getpwent 3
623 functions do behave somewhat differently from their
624 .Tn SunOS
625 counterparts.
626 The primary differences are:
627 .Bl -bullet -offset indent
628 .It
629 Each NIS password map record can be mapped into the password
630 local password space only once.
631 .It
632 The placement of the NIS
633 .Ql \&+
634 and
635 .Ql \&-
636 entries does not necessarily
637 affect where NIS password records will be mapped into
638 the password space.
639 .El
640 .Pp
641 In 99% of all
642 .Tn FreeBSD
643 configurations, NIS client behavior will be
644 indistinguishable from that of
645 .Tn SunOS
646 or other similar systems.
647 Even
648 so, users should be aware of these architectural differences.
649 .Pp
650 .Ss Using groups instead of netgroups for NIS overrides
651 .Tn FreeBSD
652 offers the capability to do override matching based on
653 user groups rather than netgroups.
654 If, for example, an NIS entry
655 is specified as:
656 .Bd -literal -offset indent
657 +@operator:::::::::
658
659 .Ed
660 the system will first try to match users against a netgroup called
661 .Ql operator .
662 If an
663 .Ql operator
664 netgroup doesn't exist, the system
665 will try to match users against the normal
666 .Ql operator
667 group instead.
668 .Ss Changes in behavior from older versions of FreeBSD
669 There have been several bug fixes and improvements in
670 .Tn FreeBSD Ns 's
671 NIS/YP handling, some of which have caused changes in behavior.
672 While the behavior changes are generally positive, it is important
673 that users and system administrators be aware of them:
674 .Bl -enum -offset indent
675 .It
676 In versions prior to 2.0.5, reverse lookups (i.e. using
677 .Fn getpwuid )
678 would not have overrides applied, which is to say that it
679 was possible for
680 .Fn getpwuid
681 to return a login name that
682 .Fn getpwnam
683 would not recognize.
684 This has been fixed: overrides specified
685 in
686 .Pa /etc/master.passwd
687 now apply to all
688 .Xr getpwent 3
689 functions.
690 .It
691 Prior to
692 .Fx 2.0.5 ,
693 netgroup overrides did not work at
694 all, largely because
695 .Tn FreeBSD
696 did not have support for reading
697 netgroups through NIS.
698 Again, this has been fixed, and
699 netgroups can be specified just as in
700 .Tn SunOS
701 and similar NIS-capable
702 systems.
703 .It
704 .Tn FreeBSD
705 now has NIS server capabilities and supports the use
706 of
707 .Pa master.passwd
708 NIS maps in addition to the standard Sixth Edition format
709 .Pa passwd
710 maps.
711 This means that you can specify change, expiration and class
712 information through NIS, provided you use a
713 .Tn FreeBSD
714 system as
715 the NIS server.
716 .El
717 .Sh FILES
718 .Bl -tag -width /etc/master.passwd -compact
719 .It Pa /etc/passwd
720 .Tn ASCII
721 password file, with passwords removed
722 .It Pa /etc/pwd.db
723 .Xr db 3 -format
724 password database, with passwords removed
725 .It Pa /etc/master.passwd
726 .Tn ASCII
727 password file, with passwords intact
728 .It Pa /etc/spwd.db
729 .Xr db 3 -format
730 password database, with passwords intact
731 .El
732 .Sh SEE ALSO
733 .Xr chpass 1 ,
734 .Xr login 1 ,
735 .Xr passwd 1 ,
736 .Xr getpwent 3 ,
737 .Xr login_getclass 3 ,
738 .Xr login.conf 5 ,
739 .Xr adduser 8 ,
740 .Xr pw 8 ,
741 .Xr pwd_mkdb 8 ,
742 .Xr vipw 8 ,
743 .Xr yp 8
744 .Sh BUGS
745 User information should (and eventually will) be stored elsewhere.
746 .Pp
747 The YP/NIS password database makes encrypted passwords visible to
748 ordinary users, thus making password cracking easier unless you use
749 shadow passwords with the
750 .Pa master.passwd
751 maps and
752 .Tn FreeBSD Ns 's
753 .Xr ypserv 8
754 server.
755 .Pp
756 Unless you're using
757 .Tn FreeBSD Ns 's
758 .Xr ypserv 8 ,
759 which supports the use of
760 .Pa master.passwd
761 type maps,
762 the YP/NIS password database will be in old-style (Sixth Edition) format,
763 which means that site-wide values for user login class, password
764 expiration date, and other fields present in the current format
765 will not be available when a
766 .Tn FreeBSD
767 system is used as a client with
768 a standard NIS server.
769 .Sh COMPATIBILITY
770 The password file format has changed since
771 .Bx 4.3 .
772 The following awk script can be used to convert your old-style password
773 file into a new style password file.
774 The additional fields
775 .Dq class ,
776 .Dq change
777 and
778 .Dq expire
779 are added, but are turned off by default.
780 These fields can then be set using
781 .Xr vipw 8
782 or
783 .Xr pw 8 .
784 .Bd -literal -offset indent
785 BEGIN { FS = ":"}
786 { print $1 ":" $2 ":" $3 ":" $4 "::0:0:" $5 ":" $6 ":" $7 }
787 .Ed
788 .Sh HISTORY
789 A
790 .Nm
791 file format appeared in
792 .At v6 .
793 The YP/NIS functionality is modeled after
794 .Tn SunOS
795 and first appeared in
796 .Fx 1.1
797 The override capability is new in
798 .Fx 2.0 .
799 The override capability was updated to properly support netgroups
800 in
801 .Fx 2.0.5 .
802 Support for comments first appeared in
803 .Fx 3.0 .