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