]> git.cameronkatri.com Git - pw-darwin.git/blob - adduser/adduser.8
Removing -batch option from adduser. Adduser was written as
[pw-darwin.git] / adduser / adduser.8
1 .\" Copyright (c) 1995-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
2 .\" 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 THE AUTHOR 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 THE AUTHOR 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 .\" $Id: adduser.8,v 1.25 1998/03/18 16:21:55 hoek Exp $
26 .\"
27 .Dd January 9, 1995
28 .Dt ADDUSER 8
29 .Os FreeBSD 2.1
30 .Sh NAME
31 .Nm adduser
32 .Nd command for adding new users
33 .Sh SYNOPSIS
34 .Nm adduser
35 .Op Fl check_only
36 .br
37 .Op Fl class Ar login_class
38 .br
39 .Op Fl config_create
40 .br
41 .Op Fl dotdir Ar dotdir
42 .br
43 .Op Fl group Ar login_group
44 .br
45 .Op Fl h | help
46 .br
47 .Op Fl home Ar home
48 .br
49 .Op Fl message Ar message_file
50 .br
51 .Op Fl noconfig
52 .br
53 .Op Fl shell Ar shell
54 .br
55 .Op Fl s | silent | q | quiet
56 .br
57 .Op Fl uid Ar uid_start
58 .br
59 .Op Fl v | verbose
60 .Sh DESCRIPTION
61 .Nm Adduser
62 is a simple program for adding new users. Adduser checks
63 the passwd, group and shell databases. It creates passwd/group entries,
64 .Ev HOME
65 directory, dotfiles and sends the new user a welcome message.
66 .Sh RESTRICTIONS
67 .Bl -tag -width Ds -compact
68 .It Sy username
69 Login name. May contain only lowercase characters or digits. Maximum length
70 is 16 characters (see
71 .Xr setlogin 2
72 BUGS section).
73 The reasons for this limit are "Historical".
74 Given that people have traditionally wanted to break this
75 limit for aesthetic reasons, it's never been of great importance to break
76 such a basic fundamental parameter in UNIX.
77 You can change
78 .Dv UT_NAMESIZE
79 in
80 .Pa /usr/include/utmp.h
81 and recompile the
82 world; people have done this and it works, but you will have problems
83 with any precompiled programs, or source that assumes the 8-character
84 name limit and NIS. The NIS protocol mandates an 8-character username.
85 If you need a longer login name for e-mail addresses,
86 you can define an alias in
87 .Pa /etc/aliases .
88 .It Sy fullname
89 Firstname and surname.
90 The
91 .Ql Pa \:
92 character is not allowed.
93 .It Sy shell
94 Only valid shells from the shell database or sliplogin and pppd
95 .It Sy uid
96 Automatically generated or your choice, must be less than 32000.
97 .It Sy gid/login group
98 Your choice or automatically generated.
99 .It Sy password
100 If not empty, password is encoded with
101 .Xr crypt 3 .
102 .El
103 .Sh UNIQUE GROUPS
104 Perhaps you're missing what
105 .Em can
106 be done with this scheme that falls apart
107 with most other schemes. With each user in his/her own group the user can
108 safely run with a umask of 002 and have files created in their home directory
109 and not worry about others being able to read them.
110 .Pp
111 For a shared area you create a separate uid/gid (like cvs or ncvs on freefall),
112 you place each person that should be able to access this area into that new
113 group.
114 .Pp
115 This model of uid/gid administration allows far greater flexibility than lumping
116 users into groups and having to muck with the umask when working in a shared
117 area.
118 .Pp
119 I have been using this model for almost 10 years and found that it works
120 for most situations, and has never gotten in the way. (Rod Grimes)
121 .Sh CONFIGURATION
122 .Bl -enum
123 .It
124 Read internal variables.
125 .It
126 Read configuration file (/etc/adduser.conf).
127 .It
128 Parse command line options.
129 .El
130 .Sh OPTIONS
131 .Bl -tag -width Ds
132 .It Sy -check_only
133 Check /etc/passwd, /etc/group, /etc/shells and exit.
134 .It Sy -class Ar login_class
135 Set default login class.
136 .It Sy -config_create
137 Create new configuration and message file and exit.
138 .It Sy -dotdir Ar directory
139 Copy files from
140 .Ar directory
141 into the
142 .Ev HOME
143 directory of new users,
144 .Ql Pa dot.foo
145 will be renamed to
146 .Ql Pa .foo .
147 Don't copy files if
148 .Ar directory
149 specified is equal to
150 .Ar no .
151 For security make all files writable and readable for owner,
152 don't allow group or world to write files and allow only owner
153 to read/execute/write
154 .Pa .rhost ,
155 .Pa .Xauthority ,
156 .Pa .kermrc ,
157 .Pa .netrc ,
158 .Pa Mail ,
159 .Pa prv ,
160 .Pa iscreen ,
161 .Pa term .
162 .It Sy -group Ar login_group
163 Login group.
164 .Ar USER
165 means that the username is to be used as login group.
166 .It Sy -help,-h,-?
167 Print a summary of options and exit.
168 .It Sy -home Ar partition
169 Default home partition where all users located.
170 .It Sy -message Ar file
171 Send new users a welcome message from
172 .Ar file .
173 Specifying a value of
174 .Ar no
175 for
176 .Ar file
177 causes no message to be sent to new users.
178 .It Sy -noconfig
179 Do not read the default configuration file.
180 .It Sy -shell Ar shell
181 Default shell for new users.
182 .It Sy -silent,-s,-quiet,-q
183 Few warnings, questions, bug reports.
184 .It Sy -uid Ar uid
185 Use uid's from
186 .Ar uid
187 on up.
188 .It Sy -verbose,-v
189 Many warnings, questions. Recommended for novice users.
190 .Sh FORMATS
191 .Bl -tag -width Ds -compact
192 .Ql Pa #
193 is a comment.
194 .It Sy configuration file
195 .Nm Adduser
196 reads and writes this file.
197 See
198 .Pa /etc/adduser.conf
199 for more details.
200 .It Sy message file
201 Eval variables in this file. See
202 .Pa /etc/adduser.message
203 for more
204 details.
205 .El
206 .Sh FILES
207 .Bl -tag -width /etc/master.passwdxx -compact
208 .It Pa /etc/master.passwd
209 user database
210 .It Pa /etc/group
211 group database
212 .It Pa /etc/shells
213 shell database
214 .It Pa /etc/login.conf
215 login classes database
216 .It Pa /etc/adduser.conf
217 configuration file for adduser
218 .It Pa /etc/adduser.message
219 message file for adduser
220 .It Pa /usr/share/skel
221 skeletal login directory
222 .It Pa /var/log/adduser
223 logfile for adduser
224 .El
225 .Sh SEE ALSO
226 .Xr chpass 1 ,
227 .Xr finger 1 ,
228 .Xr passwd 1 ,
229 .Xr setlogin 2 ,
230 .Xr yp 4 ,
231 .Xr aliases 5 ,
232 .Xr group 5 ,
233 .Xr login.conf 5 ,
234 .Xr passwd 5 ,
235 .Xr shells 5 ,
236 .Xr addgroup 8 ,
237 .Xr pw 8 ,
238 .Xr pwd_mkdb 8 ,
239 .Xr rmgroup 8 ,
240 .Xr rmuser 8 ,
241 .Xr vipw 8
242 .\" .Sh BUGS
243 .Sh HISTORY
244 The
245 .Nm
246 command appeared in
247 .Fx 2.1 .