1ad7cf975SJoerg Wunsch.\" Copyright (C) 1996 2ad7cf975SJoerg Wunsch.\" David L. Nugent. All rights reserved. 3d6f907dcSJoerg Wunsch.\" 448aee7f3SJoerg Wunsch.\" Redistribution and use in source and binary forms, with or without 548aee7f3SJoerg Wunsch.\" modification, are permitted provided that the following conditions 648aee7f3SJoerg Wunsch.\" are met: 748aee7f3SJoerg Wunsch.\" 1. Redistributions of source code must retain the above copyright 848aee7f3SJoerg Wunsch.\" notice, this list of conditions and the following disclaimer. 948aee7f3SJoerg Wunsch.\" 2. Redistributions in binary form must reproduce the above copyright 1048aee7f3SJoerg Wunsch.\" notice, this list of conditions and the following disclaimer in the 1148aee7f3SJoerg Wunsch.\" documentation and/or other materials provided with the distribution. 12d6f907dcSJoerg Wunsch.\" 13ad7cf975SJoerg Wunsch.\" THIS SOFTWARE IS PROVIDED BY DAVID L. NUGENT AND CONTRIBUTORS ``AS IS'' AND 1448aee7f3SJoerg Wunsch.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1548aee7f3SJoerg Wunsch.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16ad7cf975SJoerg Wunsch.\" ARE DISCLAIMED. IN NO EVENT SHALL DAVID L. NUGENT OR CONTRIBUTORS BE LIABLE 1748aee7f3SJoerg Wunsch.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1848aee7f3SJoerg Wunsch.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1948aee7f3SJoerg Wunsch.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2048aee7f3SJoerg Wunsch.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2148aee7f3SJoerg Wunsch.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2248aee7f3SJoerg Wunsch.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2348aee7f3SJoerg Wunsch.\" SUCH DAMAGE. 2448aee7f3SJoerg Wunsch.\" 2585204142SLukas Ertl.Dd March 30, 2007 26d6f907dcSJoerg Wunsch.Dt PW.CONF 5 27d6f907dcSJoerg Wunsch.Os 28d6f907dcSJoerg Wunsch.Sh NAME 29d6f907dcSJoerg Wunsch.Nm pw.conf 30d6f907dcSJoerg Wunsch.Nd format of the pw.conf configuration file 31d6f907dcSJoerg Wunsch.Sh DESCRIPTION 32d6f907dcSJoerg WunschThe file 33*37b983c0SJoel Dahl.Pa /etc/pw.conf 34d6f907dcSJoerg Wunschcontains configuration data for the 35d6f907dcSJoerg Wunsch.Xr pw 8 36860f0df3SPhilippe Charnierutility. 37d6f907dcSJoerg WunschThe 38d6f907dcSJoerg Wunsch.Xr pw 8 39860f0df3SPhilippe Charnierutility is used for maintenance of the system password and group 40d6f907dcSJoerg Wunschfiles, allowing users and groups to be added, deleted and changed. 41d6f907dcSJoerg WunschThis file may be modified via the 42d6f907dcSJoerg Wunsch.Xr pw 8 43d6f907dcSJoerg Wunschcommand using the 441dcc6ec7SPhilippe Charnier.Ar useradd 45d6f907dcSJoerg Wunschcommand and the 461dcc6ec7SPhilippe Charnier.Fl D 47d6f907dcSJoerg Wunschoption, or by editing it directly with a text editor. 48d6f907dcSJoerg Wunsch.Pp 49d6f907dcSJoerg WunschEach line in 50860f0df3SPhilippe Charnier.Pa /etc/pw.conf 51d6f907dcSJoerg Wunschis treated either a comment or as configuration data; 52d6f907dcSJoerg Wunschblank lines and lines commencing with a 53d6f907dcSJoerg Wunsch.Ql \&# 54d6f907dcSJoerg Wunschcharacter are considered comments, and any remaining lines are 55d6f907dcSJoerg Wunschexamined for a leading keyword, followed by corresponding data. 56d6f907dcSJoerg Wunsch.Pp 57dfb9495bSTim VanderhoekKeywords recognized by 58d6f907dcSJoerg Wunsch.Xr pw 8 59d6f907dcSJoerg Wunschare: 60d6f907dcSJoerg Wunsch.Bl -tag -width password_days -offset indent -compact 61d6f907dcSJoerg Wunsch.It defaultpasswd 621dcc6ec7SPhilippe Charnieraffect passwords generated for new users 63d6f907dcSJoerg Wunsch.It reuseuids 64d6f907dcSJoerg Wunschreuse gaps in uid sequences 65d6f907dcSJoerg Wunsch.It reusegids 66d6f907dcSJoerg Wunschreuse gaps in gid sequences 67f1d684faSDavid Nugent.It nispasswd 68860f0df3SPhilippe Charnierpath to the 69860f0df3SPhilippe Charnier.Tn NIS 70860f0df3SPhilippe Charnierpasswd database 71d6f907dcSJoerg Wunsch.It skeleton 72d6f907dcSJoerg Wunschwhere to obtain default home contents 73d6f907dcSJoerg Wunsch.It newmail 74d6f907dcSJoerg Wunschmail to send to new users 75d6f907dcSJoerg Wunsch.It logfile 76d6f907dcSJoerg Wunschlog user/group modifications to this file 77d6f907dcSJoerg Wunsch.It home 78d6f907dcSJoerg Wunschroot directory for home directories 7985204142SLukas Ertl.It homemode 8085204142SLukas Ertlpermissions for home directory 81d6f907dcSJoerg Wunsch.It shellpath 82d6f907dcSJoerg Wunschpaths in which to locate shell programs 83d6f907dcSJoerg Wunsch.It shells 84d6f907dcSJoerg Wunschlist of valid shells (without path) 85d6f907dcSJoerg Wunsch.It defaultshell 86d6f907dcSJoerg Wunschdefault shell (without path) 87d6f907dcSJoerg Wunsch.It defaultgroup 88d6f907dcSJoerg Wunschdefault group 89d6f907dcSJoerg Wunsch.It extragroups 90d6f907dcSJoerg Wunschadd new users to this groups 9148aee7f3SJoerg Wunsch.It defaultclass 92d6f907dcSJoerg Wunschplace new users in this login class 93d6f907dcSJoerg Wunsch.It minuid 94d6f907dcSJoerg Wunsch.It maxuid 95d6f907dcSJoerg Wunschrange of valid default user ids 96d6f907dcSJoerg Wunsch.It mingid 97d6f907dcSJoerg Wunsch.It maxgid 98d6f907dcSJoerg Wunschrange of valid default group ids 99d6f907dcSJoerg Wunsch.It expire_days 100d6f907dcSJoerg Wunschdays after which account expires 101d6f907dcSJoerg Wunsch.It password_days 102d6f907dcSJoerg Wunschdays after which password expires 103d6f907dcSJoerg Wunsch.El 104d6f907dcSJoerg Wunsch.Pp 105d6f907dcSJoerg WunschValid values for 106d6f907dcSJoerg Wunsch.Ar defaultpasswd 1071dcc6ec7SPhilippe Charnierare: 108d6f907dcSJoerg Wunsch.Bl -tag -width password_days -offset indent -compact 109d6f907dcSJoerg Wunsch.It no 1101dcc6ec7SPhilippe Charnierdisable login on newly created accounts 111d6f907dcSJoerg Wunsch.It yes 1121dcc6ec7SPhilippe Charnierforce the password to be the account name 113d6f907dcSJoerg Wunsch.It none 1141dcc6ec7SPhilippe Charnierforce a blank password 115d6f907dcSJoerg Wunsch.It random 1161dcc6ec7SPhilippe Charniergenerate a random password 117d6f907dcSJoerg Wunsch.El 118d6f907dcSJoerg Wunsch.Pp 119d6f907dcSJoerg WunschThe second and third options are insecure and should be avoided if 120d6f907dcSJoerg Wunschpossible on a publicly accessible system. 121d6f907dcSJoerg WunschThe first option requires that the superuser run 122d6f907dcSJoerg Wunsch.Xr passwd 1 123d6f907dcSJoerg Wunschto set a password before the account may be used. 124d6f907dcSJoerg WunschThis may also be useful for creating administrative accounts. 125d6f907dcSJoerg WunschThe final option causes 126d6f907dcSJoerg Wunsch.Xr pw 8 127d6f907dcSJoerg Wunschto respond by printing a randomly generated password on stdout. 128d6f907dcSJoerg WunschThis is the preferred and most secure option. 129860f0df3SPhilippe CharnierThe 130860f0df3SPhilippe Charnier.Xr pw 8 131860f0df3SPhilippe Charnierutility also provides a method of setting a specific password for the new 132d6f907dcSJoerg Wunschuser via a filehandle (command lines are not secure). 133d6f907dcSJoerg Wunsch.Pp 134d6f907dcSJoerg WunschBoth 135d6f907dcSJoerg Wunsch.Ar reuseuids 136d6f907dcSJoerg Wunschand 137d6f907dcSJoerg Wunsch.Ar reusegids 138d6f907dcSJoerg Wunschdetermine the method by which new user and group id numbers are 139d6f907dcSJoerg Wunschgenerated. 140d6f907dcSJoerg WunschA 141d6f907dcSJoerg Wunsch.Ql \&yes 142d6f907dcSJoerg Wunschin this field will cause 143d6f907dcSJoerg Wunsch.Xr pw 8 144d6f907dcSJoerg Wunschto search for the first unused user or group id within the allowed 145d6f907dcSJoerg Wunschrange, whereas a 146d6f907dcSJoerg Wunsch.Ql \&no 147d6f907dcSJoerg Wunschwill ensure that no other existing user or group id within the range 148d6f907dcSJoerg Wunschis numerically lower than the new one generated, and therefore avoids 149d6f907dcSJoerg Wunschreusing gaps in the user or group id sequence that are caused by 150d6f907dcSJoerg Wunschprevious user or group deletions. 151d6f907dcSJoerg WunschNote that if the default group is not specified using the 152d6f907dcSJoerg Wunsch.Ar defaultgroup 153d6f907dcSJoerg Wunschkeyword, 1541dcc6ec7SPhilippe Charnier.Xr pw 8 155d6f907dcSJoerg Wunschwill create a new group for the user and attempt to keep the new 156d6f907dcSJoerg Wunschuser's uid and gid the same. 157d6f907dcSJoerg WunschIf the new user's uid is currently in use as a group id, then the next 158d6f907dcSJoerg Wunschavailable group id is chosen instead. 159d6f907dcSJoerg Wunsch.Pp 160860f0df3SPhilippe CharnierOn 161860f0df3SPhilippe Charnier.Tn NIS 162860f0df3SPhilippe Charnierservers which maintain a separate passwd database to 163f1d684faSDavid Nugent.Pa /etc/master.passwd , 164f1d684faSDavid Nugentthis option allows the additional file to be concurrently updated 165f1d684faSDavid Nugentas user records are added, modified or removed. 166f1d684faSDavid NugentIf blank or set to 'no', no additional database is updated. 167f1d684faSDavid NugentAn absolute pathname must be used. 168f1d684faSDavid Nugent.Pp 169d6f907dcSJoerg WunschThe 170d6f907dcSJoerg Wunsch.Ar skeleton 171d6f907dcSJoerg Wunschkeyword nominates a directory from which the contents of a user's 172d6f907dcSJoerg Wunschnew home directory is constructed. 173d6f907dcSJoerg WunschThis is 174d6f907dcSJoerg Wunsch.Pa /usr/share/skel 175d6f907dcSJoerg Wunschby default. 176860f0df3SPhilippe CharnierThe 177860f0df3SPhilippe Charnier.Xr pw 8 Ns 's 1781dcc6ec7SPhilippe Charnier.Fl m 179d6f907dcSJoerg Wunschoption causes the user's home directory to be created and populated 180d6f907dcSJoerg Wunschusing the files contained in the 181d6f907dcSJoerg Wunsch.Ar skeleton 182d6f907dcSJoerg Wunschdirectory. 183d6f907dcSJoerg Wunsch.Pp 184d6f907dcSJoerg WunschTo send an initial email to new users, the 185d6f907dcSJoerg Wunsch.Ar newmail 186d6f907dcSJoerg Wunschkeyword may be used to specify a path name to a file containing 187d6f907dcSJoerg Wunschthe message body of the message to be sent. 188d6f907dcSJoerg WunschTo avoid sending mail when accounts are created, leave this entry 189d6f907dcSJoerg Wunschblank or specify 190d6f907dcSJoerg Wunsch.Ql \&no . 191d6f907dcSJoerg Wunsch.Pp 192d6f907dcSJoerg WunschThe 193d6f907dcSJoerg Wunsch.Ar logfile 194d6f907dcSJoerg Wunschoption allows logging of password file modifications into the 195d6f907dcSJoerg Wunschnominated log file. 196d6f907dcSJoerg WunschTo avoid creating or adding to such a logfile, then leave this 197d6f907dcSJoerg Wunschfield blank or specify 198d6f907dcSJoerg Wunsch.Ql \&no . 199d6f907dcSJoerg Wunsch.Pp 200d6f907dcSJoerg WunschThe 201d6f907dcSJoerg Wunsch.Ar home 202d6f907dcSJoerg Wunschkeyword is mandatory. 203d6f907dcSJoerg WunschThis specifies the location of the directory in which all new user 204d6f907dcSJoerg Wunschhome directories are created. 205d6f907dcSJoerg Wunsch.Pp 206860f0df3SPhilippe CharnierThe 20785204142SLukas Ertl.Ar homemode 20885204142SLukas Ertlkeyword is optional. 20985204142SLukas ErtlIt specifies the creation mask of the user's home directory and is modified by 21085204142SLukas Ertl.Xr umask 2 . 21185204142SLukas Ertl.Pp 21285204142SLukas ErtlThe 213d6f907dcSJoerg Wunsch.Ar shellpath 214860f0df3SPhilippe Charnierkeyword specifies a list of directories - separated by colons 215d6f907dcSJoerg Wunsch.Ql \&: 216d6f907dcSJoerg Wunsch- which contain the programs used by the login shells. 217d6f907dcSJoerg Wunsch.Pp 218d6f907dcSJoerg WunschThe 219d6f907dcSJoerg Wunsch.Ar shells 220d6f907dcSJoerg Wunschkeyword specifies a list of programs available for use as login 221d6f907dcSJoerg Wunschshells. 222d6f907dcSJoerg WunschThis list is a comma-separated list of shell names which should 223d6f907dcSJoerg Wunschnot contain a path. 224d6f907dcSJoerg WunschThese shells must exist in one of the directories nominated by 225d6f907dcSJoerg Wunsch.Ar shellpath . 226d6f907dcSJoerg Wunsch.Pp 227d6f907dcSJoerg WunschThe 228d6f907dcSJoerg Wunsch.Ar defaultshell 229d6f907dcSJoerg Wunschkeyword nominates which shell program to use for new users when 230d6f907dcSJoerg Wunschnone is specified on the 231d6f907dcSJoerg Wunsch.Xr pw 8 232d6f907dcSJoerg Wunschcommand line. 233d6f907dcSJoerg Wunsch.Pp 234d6f907dcSJoerg WunschThe 235d6f907dcSJoerg Wunsch.Ar defaultgroup 236d6f907dcSJoerg Wunschkeyword defines the primary group (the group id number in the 237d6f907dcSJoerg Wunschpassword file) used for new accounts. 238d6f907dcSJoerg WunschIf left blank, or the word 239d6f907dcSJoerg Wunsch.Ql \&no 240d6f907dcSJoerg Wunschis used, then each new user will have a corresponding group of 241d6f907dcSJoerg Wunschtheir own created automatically. 242d6f907dcSJoerg WunschThis is the recommended procedure for new users as it best secures each 243d6f907dcSJoerg Wunschuser's files against interference by other users of the system 244d6f907dcSJoerg Wunschirrespective of the 24548aee7f3SJoerg Wunsch.Em umask 246d6f907dcSJoerg Wunschnormally used by the user. 247d6f907dcSJoerg Wunsch.Pp 248860f0df3SPhilippe CharnierThe 249d6f907dcSJoerg Wunsch.Ar extragroups 250860f0df3SPhilippe Charnierkeyword provides an automatic means of placing new users into groups within 251d6f907dcSJoerg Wunschthe 252d6f907dcSJoerg Wunsch.Pa /etc/groups 253d6f907dcSJoerg Wunschfile. 254d6f907dcSJoerg WunschThis is useful where all users share some resources, and is preferable 255d6f907dcSJoerg Wunschto placing users into the same primary group. 256d6f907dcSJoerg WunschThe effect of this keyword can be overridden using the 2571dcc6ec7SPhilippe Charnier.Fl G 25848aee7f3SJoerg Wunschoption on the 25948aee7f3SJoerg Wunsch.Xr pw 8 260d6f907dcSJoerg Wunschcommand line. 261d6f907dcSJoerg Wunsch.Pp 262d6f907dcSJoerg WunschThe 26348aee7f3SJoerg Wunsch.Ar defaultclass 26448aee7f3SJoerg Wunschfield determines the login class (See 26548aee7f3SJoerg Wunsch.Xr login.conf 5 ) 26648aee7f3SJoerg Wunschthat new users will be allocated unless overwritten by 26748aee7f3SJoerg Wunsch.Xr pw 8 . 26848aee7f3SJoerg Wunsch.Pp 26948aee7f3SJoerg WunschThe 270d6f907dcSJoerg Wunsch.Ar minuid , 271d6f907dcSJoerg Wunsch.Ar maxuid , 272d6f907dcSJoerg Wunsch.Ar mingid , 273d6f907dcSJoerg Wunsch.Ar maxgid 274860f0df3SPhilippe Charnierkeywords determine the allowed ranges of automatically allocated user 275d6f907dcSJoerg Wunschand group id numbers. 276d6f907dcSJoerg WunschThe default values for both user and group ids are 1000 and 32000 as 277d6f907dcSJoerg Wunschminimum and maximum respectively. 278d6f907dcSJoerg WunschThe user and group id's actually used when creating an account with 279d6f907dcSJoerg Wunsch.Xr pw 8 280d6f907dcSJoerg Wunschmay be overridden using the 2811dcc6ec7SPhilippe Charnier.Fl u 282d6f907dcSJoerg Wunschand 2831dcc6ec7SPhilippe Charnier.Fl g 284d6f907dcSJoerg Wunschcommand line options. 285d6f907dcSJoerg Wunsch.Pp 286d6f907dcSJoerg WunschThe 287d6f907dcSJoerg Wunsch.Ar expire_days 288d6f907dcSJoerg Wunschand 289d6f907dcSJoerg Wunsch.Ar password_days 290d6f907dcSJoerg Wunschare used to automatically calculate the number of days from the date 291d6f907dcSJoerg Wunschon which an account is created when the account will expire or the 292d6f907dcSJoerg Wunschuser will be forced to change the account's password. 293d6f907dcSJoerg WunschA value of 294d6f907dcSJoerg Wunsch.Ql \&0 295d6f907dcSJoerg Wunschin either field will disable the corresponding (account or password) 296d6f907dcSJoerg Wunschexpiration date. 297d6f907dcSJoerg Wunsch.Sh LIMITS 298d6f907dcSJoerg WunschThe maximum line length of 2999d8caa0aSDavid Nugent.Pa /etc/pw.conf 300f2e366a1SSheldon Hearnis 1024 characters. 301f2e366a1SSheldon HearnLonger lines will be skipped and treated 302d6f907dcSJoerg Wunschas comments. 303d6f907dcSJoerg Wunsch.Sh FILES 304d6f907dcSJoerg Wunsch.Bl -tag -width /etc/master.passwd -compact 305d6f907dcSJoerg Wunsch.It Pa /etc/pw.conf 306d6f907dcSJoerg Wunsch.It Pa /etc/passwd 307d6f907dcSJoerg Wunsch.It Pa /etc/master.passwd 308d6f907dcSJoerg Wunsch.It Pa /etc/group 309d6f907dcSJoerg Wunsch.El 310d6f907dcSJoerg Wunsch.Sh SEE ALSO 311d6f907dcSJoerg Wunsch.Xr passwd 1 , 31285204142SLukas Ertl.Xr umask 2 , 313bfd34a4aSWolfram Schneider.Xr group 5 , 314bfd34a4aSWolfram Schneider.Xr login.conf 5 , 315d6f907dcSJoerg Wunsch.Xr passwd 5 , 316bfd34a4aSWolfram Schneider.Xr pw 8 317