xref: /freebsd/usr.sbin/adduser/adduser.conf.5 (revision 732a02b4e77866604a120a275c082bb6221bd2ff)
1.\"
2.\" Copyright (c) 2004 Tom Rhodes
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd April 12, 2007
29.Dt ADDUSER.CONF 5
30.Os
31.Sh NAME
32.Nm adduser.conf
33.Nd
34.Xr adduser 8
35configuration file
36.Sh DESCRIPTION
37The
38.Pa /etc/adduser.conf
39file is automatically generated by the
40.Xr adduser 8
41utility when invoked with the
42.Fl C
43command-line option.
44It is not meant to be edited by hand.
45.Pp
46The
47.Pa /etc/adduser.conf
48file is used to pre-set certain configuration options for
49the
50.Xr adduser 8
51utility.
52When
53.Xr adduser 8
54is invoked, it will check to see if this file exists, and
55if so, the configuration will be used or offered as the
56default settings.
57The
58.Nm
59file offers three types of configuration:
60.Bl -bullet
61.It
62Default settings offered by
63.Xr adduser 8 .
64These options are specified in the configuration file and offered
65as the default during every invocation of the
66.Xr adduser 8
67utility.
68.It
69Configuration options which can be set in
70.Nm ,
71but overridden by passing a flag to
72.Xr adduser 8 .
73.It
74Configuration supported by
75.Xr adduser 8
76but not offered by a flag or during initial invocation.
77.El
78.Pp
79In the first case, these options can be set in
80.Nm
81but will still be offered when
82.Xr adduser 8
83is invoked.
84In the second case,
85.Xr adduser 8
86will read the configuration data unless a flag
87has been passed to override it.
88For example, the
89.Va defaultshell
90option.
91In the third case, the configuration will be utilized, but the
92user will never be prompted to modify the default setting by
93either a flag or an
94.Xr adduser 8
95prompt.
96For example, the
97.Va upwexpire
98setting.
99.Pp
100The following configuration options can be set in
101.Nm :
102.Bl -tag -width ".Va defaultgroups" -offset indent
103.It Va defaultLgroup
104The default group new users will be added to.
105.It Va defaultclass
106The default class to place users in as described in
107.Xr login.conf 5 .
108.It Va defaultgroups
109This option is used to specify what other groups the new account
110should be added to.
111.It Va passwdtype
112May be one of
113.Cm no , none , random ,
114or
115.Cm yes ,
116as described in
117.Xr adduser 8 .
118As such, the text is not duplicated here and may be
119read in
120.Xr adduser 8 .
121.It Va homeprefix
122The default home directory prefix, usually
123.Pa /home .
124.It Va defaultshell
125The user's default shell which may be any of the shells listed in
126.Xr shells 5 .
127.It Va udotdir
128Defines the location of the default shell and environment
129configuration files.
130.It Va msgfile
131Location of the default new user message file.
132This message will be sent to all new users if specified
133here or at the
134.Xr adduser 8
135prompt.
136.It Va disableflag
137The default message enclosed in brackets for the
138lock account prompt.
139.It Va upwexpire
140The default password expiration time.
141Format of the date is either a
142.Ux
143time in decimal, or a date in
144.Sm off
145.Ar dd No - Ar mmm No - Ar yy Op Ar yy
146.Sm on
147format, where
148.Ar dd
149is the day,
150.Ar mmm
151is the month in either numeric or
152alphabetic format, and
153.Ar yy Ns Op Ar yy
154is either a two or four digit year.
155This option also accepts a relative date in the form of
156.Sm off
157.Ar n Op Ar m h d w o y
158.Sm on
159where
160.Ar n
161is a decimal, octal (leading 0) or hexadecimal (leading 0x) digit
162followed by the number of Minutes, Hours, Days, Weeks, Months or
163Years from the current date at
164which the expiration time is to be set.
165.It Va uexpire
166The default account expire time.
167The format is similar to the
168.Va upwexpire
169option.
170.It Va ugecos
171The default information to be held in the GECOS field of
172.Pa /etc/master.passwd .
173.It Va uidstart
174The default user ID setting.
175This must be a number above 1000 and fewer than 65534.
176.El
177.Sh EXAMPLES
178The following is an example
179.Nm
180file created with the
181.Fl C
182.Xr adduser 8
183flag and modified.
184.Bd -literal -offset indent
185# Configuration file for adduser(8).
186# NOTE: only *some* variables are saved.
187# Last Modified on Fri Mar 30 14:04:05 EST 2004.
188
189defaultLgroup=
190defaultclass=
191defaultgroups=
192passwdtype=yes
193homeprefix=/home
194defaultshell=/bin/csh
195udotdir=/usr/share/skel
196msgfile=/etc/adduser.msg
197disableflag=
198upwexpire=91d # Expire passwords 91 days after creation.
199.Ed
200.Sh SEE ALSO
201.Xr group 5 ,
202.Xr passwd 5 ,
203.Xr adduser 8 ,
204.Xr pw 8 ,
205.Xr rmuser 8
206.Sh HISTORY
207The
208.Nm
209manual page first appeared in
210.Fx 5.3 .
211.Sh AUTHORS
212This manual page was written by
213.An Tom Rhodes Aq Mt trhodes@FreeBSD.org .
214.Sh BUGS
215The internal variables documented here may change without notice.
216Do not rely on them.
217To modify this file invoke
218.Xr adduser 8
219with the
220.Fl C
221option instead.
222