xref: /freebsd/usr.sbin/adduser/adduser.conf.5 (revision 069ac184)
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.Dd April 12, 2007
27.Dt ADDUSER.CONF 5
28.Os
29.Sh NAME
30.Nm adduser.conf
31.Nd
32.Xr adduser 8
33configuration file
34.Sh DESCRIPTION
35The
36.Pa /etc/adduser.conf
37file is automatically generated by the
38.Xr adduser 8
39utility when invoked with the
40.Fl C
41command-line option.
42It is not meant to be edited by hand.
43.Pp
44The
45.Pa /etc/adduser.conf
46file is used to pre-set certain configuration options for
47the
48.Xr adduser 8
49utility.
50When
51.Xr adduser 8
52is invoked, it will check to see if this file exists, and
53if so, the configuration will be used or offered as the
54default settings.
55The
56.Nm
57file offers three types of configuration:
58.Bl -bullet
59.It
60Default settings offered by
61.Xr adduser 8 .
62These options are specified in the configuration file and offered
63as the default during every invocation of the
64.Xr adduser 8
65utility.
66.It
67Configuration options which can be set in
68.Nm ,
69but overridden by passing a flag to
70.Xr adduser 8 .
71.It
72Configuration supported by
73.Xr adduser 8
74but not offered by a flag or during initial invocation.
75.El
76.Pp
77In the first case, these options can be set in
78.Nm
79but will still be offered when
80.Xr adduser 8
81is invoked.
82In the second case,
83.Xr adduser 8
84will read the configuration data unless a flag
85has been passed to override it.
86For example, the
87.Va defaultshell
88option.
89In the third case, the configuration will be utilized, but the
90user will never be prompted to modify the default setting by
91either a flag or an
92.Xr adduser 8
93prompt.
94For example, the
95.Va upwexpire
96setting.
97.Pp
98The following configuration options can be set in
99.Nm :
100.Bl -tag -width ".Va defaultgroups" -offset indent
101.It Va defaultLgroup
102The default group new users will be added to.
103.It Va defaultclass
104The default class to place users in as described in
105.Xr login.conf 5 .
106.It Va defaultgroups
107This option is used to specify what other groups the new account
108should be added to.
109.It Va passwdtype
110May be one of
111.Cm no , none , random ,
112or
113.Cm yes ,
114as described in
115.Xr adduser 8 .
116As such, the text is not duplicated here and may be
117read in
118.Xr adduser 8 .
119.It Va homeprefix
120The default home directory prefix, usually
121.Pa /home .
122.It Va defaultshell
123The user's default shell which may be any of the shells listed in
124.Xr shells 5 .
125.It Va udotdir
126Defines the location of the default shell and environment
127configuration files.
128.It Va msgfile
129Location of the default new user message file.
130This message will be sent to all new users if specified
131here or at the
132.Xr adduser 8
133prompt.
134.It Va disableflag
135The default message enclosed in brackets for the
136lock account prompt.
137.It Va upwexpire
138The default password expiration time.
139Format of the date is either a
140.Ux
141time in decimal, or a date in
142.Sm off
143.Ar dd No - Ar mmm No - Ar yy Op Ar yy
144.Sm on
145format, where
146.Ar dd
147is the day,
148.Ar mmm
149is the month in either numeric or
150alphabetic format, and
151.Ar yy Ns Op Ar yy
152is either a two or four digit year.
153This option also accepts a relative date in the form of
154.Sm off
155.Ar n Op Ar m h d w o y
156.Sm on
157where
158.Ar n
159is a decimal, octal (leading 0) or hexadecimal (leading 0x) digit
160followed by the number of Minutes, Hours, Days, Weeks, Months or
161Years from the current date at
162which the expiration time is to be set.
163.It Va uexpire
164The default account expire time.
165The format is similar to the
166.Va upwexpire
167option.
168.It Va ugecos
169The default information to be held in the GECOS field of
170.Pa /etc/master.passwd .
171.It Va uidstart
172The default user ID setting.
173This must be a number above 1000 and fewer than 65534.
174.El
175.Sh EXAMPLES
176The following is an example
177.Nm
178file created with the
179.Fl C
180.Xr adduser 8
181flag and modified.
182.Bd -literal -offset indent
183# Configuration file for adduser(8).
184# NOTE: only *some* variables are saved.
185# Last Modified on Fri Mar 30 14:04:05 EST 2004.
186
187defaultLgroup=
188defaultclass=
189defaultgroups=
190passwdtype=yes
191homeprefix=/home
192defaultshell=/bin/csh
193udotdir=/usr/share/skel
194msgfile=/etc/adduser.msg
195disableflag=
196upwexpire=91d # Expire passwords 91 days after creation.
197.Ed
198.Sh SEE ALSO
199.Xr group 5 ,
200.Xr passwd 5 ,
201.Xr adduser 8 ,
202.Xr pw 8 ,
203.Xr rmuser 8
204.Sh HISTORY
205The
206.Nm
207manual page first appeared in
208.Fx 5.3 .
209.Sh AUTHORS
210This manual page was written by
211.An Tom Rhodes Aq Mt trhodes@FreeBSD.org .
212.Sh BUGS
213The internal variables documented here may change without notice.
214Do not rely on them.
215To modify this file invoke
216.Xr adduser 8
217with the
218.Fl C
219option instead.
220