xref: /freebsd/usr.sbin/pw/pw.8 (revision 23f282aa31e9b6fceacd449020e936e98d6f2298)
1.\" Copyright (C) 1996
2.\" David L. Nugent.  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.\"
13.\" THIS SOFTWARE IS PROVIDED BY DAVID L. NUGENT AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL DAVID L. NUGENT OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd December 9, 1996
28.Dt PW 8
29.Os
30.Sh NAME
31.Nm pw
32.Nd create, remove, modify & display system users and groups
33.Sh SYNOPSIS
34.Nm pw
35.Op Fl V Ar etcdir
36.Ar useradd
37.Op name|uid
38.Op Fl C Ar config
39.Op Fl q
40.Op Fl n Ar name
41.Op Fl u Ar uid
42.Op Fl c Ar comment
43.Op Fl d Ar dir
44.Op Fl e Ar date
45.Op Fl p Ar date
46.Op Fl g Ar group
47.Op Fl G Ar grouplist
48.Op Fl m
49.Op Fl k Ar dir
50.Op Fl s Ar shell
51.Op Fl o
52.Op Fl L Ar class
53.Op Fl h Ar fd
54.Op Fl N
55.Op Fl P
56.Op Fl Y
57.Nm pw
58.Op Fl V Ar etcdir
59.Ar useradd
60.Op name|uid
61.Fl D
62.Op Fl C Ar config
63.Op Fl q
64.Op Fl b Ar dir
65.Op Fl e Ar days
66.Op Fl p Ar days
67.Op Fl g Ar group
68.Op Fl G Ar grouplist
69.Op Fl k Ar dir
70.Op Fl u Ar min,max
71.Op Fl i Ar min,max
72.Op Fl w Ar method
73.Op Fl s Ar shell
74.Op Fl y Ar path
75.Nm pw
76.Op Fl V Ar etcdir
77.Ar userdel
78.Op name|uid
79.Op Fl n Ar name
80.Op Fl u Ar uid
81.Op Fl r
82.Op Fl Y
83.Nm pw
84.Op Fl V Ar etcdir
85.Ar usermod
86.Op name|uid
87.Op Fl C Ar config
88.Op Fl q
89.Op Fl n Ar name
90.Op Fl u Ar uid
91.Op Fl c Ar comment
92.Op Fl d Ar dir
93.Op Fl e Ar date
94.Op Fl p Ar date
95.Op Fl g Ar group
96.Op Fl G Ar grouplist
97.Op Fl l Ar name
98.Op Fl m
99.Op Fl k Ar dir
100.Op Fl w Ar method
101.Op Fl s Ar shell
102.Op Fl L Ar class
103.Op Fl h Ar fd
104.Op Fl N
105.Op Fl P
106.Op Fl Y
107.Nm pw
108.Op Fl V Ar etcdir
109.Ar usershow
110.Op name|uid
111.Op Fl n Ar name
112.Op Fl u Ar uid
113.Op Fl F
114.Op Fl P
115.Op Fl a
116.Nm pw
117.Op Fl V Ar etcdir
118.Ar usernext
119.Op Fl C Ar config
120.Op Fl q
121.Nm pw
122.Op Fl V Ar etcdir
123.Ar groupadd
124.Op group|gid
125.Op Fl C Ar config
126.Op Fl q
127.Op Fl n Ar group
128.Op Fl g Ar gid
129.Op Fl M Ar members
130.Op Fl o
131.Op Fl h Ar fd
132.Op Fl N
133.Op Fl P
134.Op Fl Y
135.Nm pw
136.Op Fl V Ar etcdir
137.Ar groupdel
138.Op group|gid
139.Op Fl n Ar name
140.Op Fl g Ar gid
141.Op Fl Y
142.Nm pw
143.Op Fl V Ar etcdir
144.Ar groupmod
145.Op group|gid
146.Op Fl C Ar config
147.Op Fl q
148.Op Fl F
149.Op Fl n Ar name
150.Op Fl g Ar gid
151.Op Fl l Ar name
152.Op Fl M Ar members
153.Op Fl m Ar newmembers
154.Op Fl h Ar fd
155.Op Fl N
156.Op Fl P
157.Op Fl Y
158.Nm pw
159.Op Fl V Ar etcdir
160.Ar groupshow
161.Op group|gid
162.Op Fl n Ar name
163.Op Fl g Ar gid
164.Op Fl F
165.Op Fl P
166.Op Fl a
167.Nm pw
168.Op Fl V Ar etcdir
169.Ar groupnext
170.Op Fl C Ar config
171.Op Fl q
172.Sh DESCRIPTION
173.Nm Pw
174is a command-line based editor for the system
175.Ar user
176and
177.Ar group
178files, allowing the superuser an easy to use and standardized way of adding,
179modifying and removing users and groups.
180Note that
181.Nm
182only operates on the local user and group files.  NIS users and groups must be
183maintained on the NIS server.
184.Nm Pw
185handles updating the
186.Pa passwd ,
187.Pa master.passwd ,
188.Pa group
189and the secure and insecure
190password database files, and must be run as root.
191.Pp
192The first one or two keywords provided to
193.Nm
194on the command line provide the context for the remainder of the arguments.
195The keywords
196.Ar user
197and
198.Ar group
199may be combined with
200.Ar add ,
201.Ar del ,
202.Ar mod ,
203.Ar show ,
204or
205.Ar next
206in any order.
207(For example,
208.Ar showuser ,
209.Ar usershow ,
210.Ar show user , and
211.Ar user show
212all mean the same thing.)
213This flexibility is useful for interactive scripts calling
214.Nm
215for user and group database manipulation.
216Following these keywords, you may optionally specify the user or group name or numeric
217id as an alternative to using the
218.Fl n Ar name ,
219.Fl u Ar uid ,
220.Fl g Ar gid
221options.
222.Pp
223The following flags are common to most or all modes of operation;
224.Pp
225.Bl -tag -width "-G grouplist"
226.It Fl V Ar etcdir
227This flag sets an alternate location for the password, group and configuration files,
228and may be used to maintain a user/group database in an alternate location.
229If this switch is specified, the system
230.Pa /etc/pw.conf
231will not be sourced for default configuration data, but the file pw.conf in the
232specified directory will be used instead (or none, if it does not exist).
233The
234.Fl C
235flag may be used to override this behaviour.
236As an exception to the general rule where options must follow the operation
237type, the
238.Fl V
239flag may be used on the command line before the operation keyword.
240.It Fl C Ar config
241By default,
242.Nm
243reads the file
244.Pa /etc/pw.conf
245to obtain policy information on how new user accounts and groups are to be created.
246The
247.Fl C
248option specifies a different configuration file.
249While most of the contents of the configuration file may be overridden via
250command-line options, it may be more convenient to keep standard information in a
251configuration file.
252.It Fl q
253Use of this option causes
254.Nm
255to suppress error messages, which may be useful in interactive environments where it
256is preferable to interpret status codes returned by
257.Nm
258rather than messing up a carefully formatted display.
259.It Fl N
260This option is available in
261.Ar add
262and
263.Ar modify
264operations, and tells
265.Nm
266to output the result of the operation without updating the user or group
267databases.
268You may use the
269.Fl P
270option to switch between standard passwd and readable formats.
271.It Fl Y
272Using this option with any of the update modes causes
273.Nm
274to run
275.Xr make 1
276after changing to the directory
277.Pa /var/yp .
278This is intended to allow automatic updating of NIS database files.
279If separate passwd and group files are being used by NIS, then use the
280.Fl y Ar path
281option to specify the location of the NIS passwd database so that
282.Nm
283will concurrently update it with the system password
284databases.
285.El
286.Pp
287.Sh USER OPTIONS
288The following options apply to the
289.Ar useradd
290and
291.Ar usermod
292commands:
293.Pp
294.Bl -tag -width "-G grouplist"
295.It Fl n Ar name
296Specify the user/account name.
297.It Fl u Ar uid
298Specify the user/account numeric id.
299.Pp
300Usually, you only need to provide one or the other of these options, as the account
301name will imply the uid, or vice versa.
302However, there are times when you need to provide both.
303For example, when changing the uid of an existing user with
304.Ar usermod ,
305or overriding the default uid when creating a new account.
306If you wish
307.Nm
308to automatically allocate the uid to a new user with
309.Ar useradd ,
310then you should
311.Em not
312use the
313.Ql Fl u
314option.
315You may also provide either the account or userid immediately after the
316.Ar useradd ,
317.Ar userdel ,
318.Ar usermod
319or
320.Ar usershow
321keywords on the command line without using the
322.Ql Fl n
323or
324.Ql Fl u
325options.
326.El
327.Pp
328.Bl -tag -width "-G grouplist"
329.It Fl c Ar comment
330This field sets the contents of the passwd GECOS field, which normally contains up
331to four comma-separated fields containing the user's full name, office or location,
332and work and home phone numbers.
333These sub-fields are used by convention only, however, and are optional.
334If this field is to contain spaces, you need to quote the comment itself with double
335quotes
336.Ql \&" .
337Avoid using commas in this field as these are used as sub-field separators, and the
338colon
339.Ql \&:
340character also cannot be used as this is the field separator for the passwd
341file itself.
342.It Fl d Ar dir
343This option sets the account's home directory.
344Normally, you will only use this if the home directory is to be different from the
345default determined from
346.Pa /etc/pw.conf
347- normally
348.Pa /home
349with the account name as a subdirectory.
350.It Fl e Ar date
351Set the account's expiration date.
352Format of the date is either a UNIX time in decimal, or a date in
353.Ql dd-mmm-yy[yy]
354format, where dd is the day, mmm is the month, either in numeric or alphabetic format
355('Jan', 'Feb', etc) and year is either a two or four digit year.
356This option also accepts a relative date in the form
357.Ql \&+n[mhdwoy]
358where
359.Ql \&n
360is a decimal, octal (leading 0) or hexadecimal (leading 0x) digit followed by the
361number of Minutes, Hours, Days, Weeks, Months or Years from the current date at
362which the expiration date is to be set.
363.It Fl p Ar date
364Set the account's password expiration date.
365This field is similar to the account expiration date option, except that it
366applies to forced password changes.
367This is set in the same manner as the
368.Ql Fl e
369option.
370.It Fl g Ar group
371Set the account's primary group to the given group.
372.Ar group
373may be defined by either its name or group number.
374.It Fl G Ar grouplist
375Sets additional group memberships for an account.
376.Ar grouplist
377is a comma-separated list of group names or group numbers.
378The user's name is added to the group lists in
379.Pa /etc/group ,
380and
381removed from any groups not specified in
382.Ar grouplist .
383Note: a user should not be added to their primary group with
384.Ar grouplist .
385Also, group membership changes do not take effect for current user login
386sessions, requiring the user to reconnect to be affected by the changes.
387.It Fl L Ar class
388This option sets the login class for the user being created.
389See
390.Xr login.conf 5
391for more information on user login classes.
392.It Fl m
393This option instructs
394.Nm
395to attempt to create the user's home directory.
396While primarily useful when adding a new account with
397.Ar useradd ,
398this may also be of use when moving an existing user's home directory elsewhere on
399the filesystem.
400The new home directory is populated with the contents of the
401.Ar skeleton
402directory, which typically contains a set of shell configuration files that the
403user may personalize to taste.
404When
405.Ql Fl m
406is used on an account with
407.Ar usermod ,
408existing configuration files in the user's home directory are
409.Em not
410overwritten from the skeleton files.
411.Pp
412When a user's home directory is created, it will by default be a subdirectory of the
413.Ar basehome
414directory as specified by the
415.Ql Fl b
416option (see below), bearing the name of the new account.
417This can be overridden by the
418.Ql Fl d
419option on the command line, if desired.
420.It Fl k Ar dir
421Set the
422.Ar skeleton
423directory, from which basic startup and configuration files are copied when
424the user's home directory is created.
425This option only has meaning when used with the
426.Ql Fl d
427or
428.Ql Fl m
429flags.
430.It Fl s Ar shell
431Set or changes the user's login shell to
432.Ar shell .
433If the path to the shell program is omitted,
434.Nm
435searches the
436.Ar shellpath
437specified in
438.Pa /etc/pw.conf
439and fills it in as appropriate.
440Note that unless you have a specific reason to do so, you should avoid
441specifying the path - this will allow
442.Nm
443to validate that the program exists and is executable.
444Specifying a full path (or supplying a blank "" shell) avoids this check
445and allows for such entries as
446.Pa /nonexistent
447that should be set for accounts not intended for interactive login.
448.It Fl L Ar class
449Set the
450.Em class
451field in the user's passwd record.
452This field is not currently used, but will be used in the future to specify a
453.Em termcap
454entry like tag.
455See
456.Xr passwd 5
457for details.
458.It Fl h Ar fd
459This option provides a special interface by which interactive scripts can
460set an account password using
461.Nm pw .
462Because the command line and environment are fundamentally insecure mechanisms
463by which programs can accept information,
464.Nm
465will only allow setting of account and group passwords via a file descriptor
466(usually a pipe between an interactive script and the program).
467.Ar sh ,
468.Ar bash ,
469.Ar ksh
470and
471.Ar perl
472all possess mechanisms by which this can be done.
473Alternatively,
474.Nm
475will prompt for the user's password if
476.Ql Fl h Ar 0
477is given, nominating
478.Em stdin
479as the file descriptor on which to read the password.
480Note that this password will be read only once and is intended
481for use by a script rather than for interactive use.
482If you wish to have new password confirmation along the lines of
483.Xr passwd 1 ,
484this must be implemented as part of an interactive script that calls
485.Nm pw .
486.Pp
487If a value of
488.Ql \&-
489is given as the argument
490.Ar fd ,
491then the password will be set to
492.Ql \&* ,
493rendering the account inaccessible via password-based login.
494.El
495.Pp
496It is possible to use
497.Ar useradd
498to create a new account that duplicates an existing user id.
499While this is normally considered an error and will be rejected, the
500.Ql Fl o
501option overrides the check for duplicates and allows the duplication of
502the user id.
503This may be useful if you allow the same user to login under
504different contexts (different group allocations, different home
505directory, different shell) while providing basically the same
506permissions for access to the user's files in each account.
507.Pp
508The
509.Ar useradd
510command also has the ability to set new user and group defaults by using the
511.Ql Fl D
512option.
513Instead of adding a new user,
514.Nm
515writes a new set of defaults to its configuration file,
516.Pa /etc/pw.conf .
517When using the
518.Ql Fl D
519option, you must not use either
520.Ql Fl n Ar name
521or
522.Ql Fl u Ar uid
523or an error will result.
524Use of
525.Ql Fl D
526changes the meaning of several command line switches in the
527.Ar useradd
528command.
529These are:
530.Bl -tag -width "-G grouplist"
531.It Fl D
532Set default values in
533.Pa /etc/pw.conf
534configuration file, or a different named configuration file if the
535.Ql Fl C Ar config
536option is used.
537.It Fl b Ar dir
538Set the root directory in which user home directories are created.
539The default value for this is
540.Pa /home ,
541but it may be set elsewhere as desired.
542.It Fl e Ar days
543Set the default account expiration period in days.
544Unlike use without
545.Ql Fl D ,
546the argument must be numeric, which specifies the number of days after creation when
547the account is to expire.
548A value of 0 suppresses automatic calculation of the expiry date.
549.It Fl p Ar days
550Set the default password expiration period in days.
551.It Fl g Ar group
552Set the default group for new users.
553If a blank group is specified using
554.Ql Fl g Ar \&"" ,
555then new users will be allocated their own private primary group
556with the same name as their login name.
557If a group is supplied, either its name or uid may be given as an argument.
558.It Fl G Ar grouplist
559Set the default groups in which new users are granted membership.
560This is a separate set of groups from the primary group, and you should avoid
561nominating the same group as both primary and extra groups.
562In other words, these extra groups determine membership in groups
563.Em other than
564the primary group.
565.Ar grouplist
566is a comma-separated list of group names or ids, and are always
567stored in
568.Pa /etc/pw.conf
569by their symbolic names.
570.It Fl L Ar class
571This option sets the default login class for new users.
572.It Fl k Ar dir
573Set the default
574.Em skeleton
575directory, from which prototype shell and other initialization files are copied when
576.Nm
577creates a user's home directory.
578.It Fl u Ar min,max , Fl i Ar min,max
579These options set the minimum and maximum user and group ids allocated for new accounts
580and groups created by
581.Nm pw .
582The default values for each is 1000 minimum and 32000 maximum.
583.Ar min
584and
585.Ar max
586are both numbers, where max must be greater than min, and both must be between 0
587and 32767.
588In general, user and group ids less than 100 are reserved for use by the system,
589and numbers greater than 32000 may also be reserved for special purposes (used by
590some system daemons).
591.It Fl w Ar method
592The
593.Ql Fl w
594option sets the default method used to set passwords for newly created user accounts.
595.Ar method
596is one of:
597.Pp
598.Bl -tag -width random -offset indent -compact
599.It no
600disable login on newly created accounts
601.It yes
602force the password to be the account name
603.It none
604force a blank password
605.It random
606generate a random password
607.El
608.Pp
609The
610.Ql \&random
611or
612.Ql \&no
613methods are the most secure; in the former case,
614.Nm
615generates a password and prints it to stdout, which is suitable where you issue
616users with passwords to access their accounts rather than having the user nominate
617their own (possibly poorly chosen) password.
618The
619.Ql \&no
620method requires that the superuser use
621.Xr passwd 1
622to render the account accessible with a password.
623.It Fl y Ar path
624This sets the pathname of the database used by NIS if you are not sharing
625the information from
626.Pa /etc/master.passwd
627directly with NIS.
628You should only set this option for NIS servers.
629.El
630.Pp
631The
632.Ar userdel
633command has only three valid options.
634The
635.Ql Fl n Ar name
636and
637.Ql Fl u Ar uid
638options have already been covered above.
639The additional option is:
640.Bl -tag -width "-G grouplist"
641.It Fl r
642This tells
643.Nm
644to remove the user's home directory and all of its contents.
645.Nm Pw
646errs on the side of caution when removing files from the system.
647Firstly, it will not do so if the uid of the account being removed is also used by
648another account on the system, and the 'home' directory in the password file is
649a valid path that commences with the character
650.Ql \&/ .
651Secondly, it will only remove files and directories that are actually owned by
652the user, or symbolic links owned by anyone under the user's home directory.
653Finally, after deleting all contents owned by the user only empty directories
654will be removed.
655If any additional cleanup work is required, this is left to the administrator.
656.El
657.Pp
658Mail spool files and crontabs are always removed when an account is deleted as these
659are unconditionally attached to the user name.
660Jobs queued for processing by
661.Ar at
662are also removed if the user's uid is unique and not also used by another account on the
663system.
664.Pp
665The
666.Ar usershow
667command allows viewing of an account in one of two formats.
668By default, the format is identical to the format used in
669.Pa /etc/master.passwd
670with the password field replaced with a
671.Ql \&* .
672If the
673.Ql Fl P
674option is used, then
675.Nm
676outputs the account details in a more human readable form.
677The
678.Ql Fl a
679option lists all users currently on file.
680.Pp
681The command
682.Ar usernext
683returns the next available user and group ids separated by a colon.
684This is normally of interest only to interactive scripts or front-ends
685that use
686.Nm pw .
687.Pp
688.Sh GROUP OPTIONS
689The
690.Ql Fl C
691and
692.Ql Fl q
693options (explained at the start of the previous section) are available
694with the group manipulation commands.
695Other common options to all group-related commands are:
696.Bl -tag -width "-m newmembers"
697.It Fl n Ar name
698Specify the group name.
699.It Fl g Ar gid
700Specify the group numeric id.
701.Pp
702As with the account name and id fields, you will usually only need
703to supply one of these, as the group name implies the uid and vice
704versa.
705You will only need to use both when setting a specific group id
706against a new group or when changing the uid of an existing group.
707.It Fl M Ar memberlist
708This option provides an alternative way to add existing users to a
709new group (in groupadd) or replace an existing membership list (in
710groupmod).
711.Ar memberlist
712is a comma separated list of valid and existing user names or uids.
713.It Fl m Ar newmembers
714Similar to
715.Ql Fl M ,
716this option allows the
717.Em addition
718of existing users to a group without replacing the existing list of
719members.
720Login names or user ids may be used, and duplicate users are
721silently eliminated.
722.El
723.Pp
724.Ar groupadd
725also has a
726.Ql Fl o
727option that allows allocation of an existing group id to a new group.
728The default action is to reject an attempt to add a group, and this option overrides
729the check for duplicate group ids.
730There is rarely any need to duplicate a group id.
731.Pp
732The
733.Ar groupmod
734command adds one additional option:
735.Pp
736.Bl -tag -width "-m newmembers"
737.It Fl l Ar name
738This option allows changing of an existing group name to
739.Ql \&name .
740The new name must not already exist, and any attempt to duplicate an existing group
741name will be rejected.
742.El
743.Pp
744Options for
745.Ar groupshow
746are the same as for
747.Ar usershow ,
748with the
749.Ql Fl g Ar gid
750replacing
751.Ql Fl u Ar uid
752to specify the group id.
753.Pp
754The command
755.Ar groupnext
756returns the next available group id on standard output.
757.Sh DIAGNOSTICS
758.Nm Pw
759returns EXIT_SUCCESS on successful operation, otherwise
760.Nm
761returns one of the
762following exit codes defined by
763.Xr sysexits 3
764as follows:
765.Bl -tag -width xxxx
766.It EX_USAGE
767.Bl -bullet -compact
768.It
769Command line syntax errors (invalid keyword, unknown option).
770.El
771.It EX_NOPERM
772.Bl -bullet -compact
773.It
774Attempting to run one of the update modes as non-root.
775.El
776.It EX_OSERR
777.Bl -bullet -compact
778.It
779Memory allocation error.
780.It
781Read error from password file descriptor.
782.El
783.It EX_DATAERR
784.Bl -bullet -compact
785.It
786Bad or invalid data provided or missing on the command line or
787via the password file descriptor.
788.It
789Attempted to remove, rename root account or change its uid.
790.El
791.It EX_OSFILE
792.Bl -bullet -compact
793.It
794Skeleton directory is invalid or does not exist.
795.It
796Base home directory is invalid or does not exist.
797.It
798Invalid or non-existent shell specified.
799.El
800.It EX_NOUSER
801.Bl -bullet -compact
802.It
803User, user id, group or group id specified does not exist.
804.It
805User or group recorded, added, or modified unexpectedly disappeared.
806.El
807.It EX_SOFTWARE
808.Bl -bullet -compact
809.It
810No more group or user ids available within specified range.
811.El
812.It EX_IOERR
813.Bl -bullet -compact
814.It
815Unable to rewrite configuration file.
816.It
817Error updating group or user database files.
818.It
819Update error for passwd or group database files.
820.El
821.It EX_CONFIG
822.Bl -bullet -compact
823.It
824No base home directory configured.
825.El
826.El
827.Pp
828.Sh NOTES
829For a summary of options available with each command, you can use
830.Dl pw [command] help
831For example,
832.Dl pw useradd help
833lists all available options for the useradd operation.
834.Pp
835.Nm Pw
836allows 8-bit characters in the passwd GECOS field (user's full name,
837office, work and home phone number subfields), but disallows them in
838user login and group names.
839Use 8-bit characters with caution, as connection to the Internet will
840require that your mail transport program supports 8BITMIME, and will
841convert headers containing 8-bit characters to 7-bit quoted-printable
842format.
843.Xr sendmail 8
844does support this.
845Use of 8-bit characters in the GECOS field should be used in
846conjunction with the user's default locale and character set
847and should not be implemented without their use.
848Using 8-bit characters may also affect other
849programs that transmit the contents of the GECOS field over the
850Internet, such as
851.Xr fingerd 8 ,
852and a small number of TCP/IP clients, such as IRC, where full names
853specified in the passwd file may be used by default.
854.Sh FILES
855.Bl -tag -width /etc/master.passwd.new -compact
856.It Pa /etc/master.passwd
857The user database
858.It Pa /etc/passwd
859A Version 7 format password file
860.It Pa /etc/login.conf
861The user capabilities database
862.It Pa /etc/group
863The group database
864.It Pa /etc/master.passwd.new
865Temporary copy of the master password file
866.It Pa /etc/passwd.new
867Temporary copy of the Version 7 password file
868.It Pa /etc/group.new
869Temporary copy of the group file
870.It Pa /etc/pw.conf
871Pw default options file
872.El
873.Sh SEE ALSO
874.Xr chpass 1 ,
875.Xr passwd 1 ,
876.Xr group 5 ,
877.Xr login.conf 5 ,
878.Xr passwd 5 ,
879.Xr pw.conf 5 ,
880.Xr pwd_mkdb 8 ,
881.Xr vipw 8
882.Sh HISTORY
883.Nm Pw
884was written to mimic many of the options used in the SYSV
885.Em shadow
886support suite, but is modified for passwd and group fields specific to
887the
888.Bx 4.4
889operating system, and combines all of the major elements
890into a single command.
891