1 .\" Copyright (c) 1995-1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
25 .\" $Id: adduser.8,v 1.25 1998/03/18 16:21:55 hoek Exp $
32 .Nd command for adding new users
37 .Op Fl class Ar login_class
41 .Op Fl dotdir Ar dotdir
43 .Op Fl group Ar login_group
49 .Op Fl message Ar message_file
55 .Op Fl s | silent | q | quiet
57 .Op Fl uid Ar uid_start
62 is a simple program for adding new users. Adduser checks
63 the passwd, group and shell databases. It creates passwd/group entries,
65 directory, dotfiles and sends the new user a welcome message.
67 .Bl -tag -width Ds -compact
69 Login name. May contain only lowercase characters or digits. Maximum length
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.
80 .Pa /usr/include/utmp.h
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
89 Firstname and surname.
92 character is not allowed.
94 Only valid shells from the shell database or sliplogin and pppd
96 Automatically generated or your choice, must be less than 32000.
97 .It Sy gid/login group
98 Your choice or automatically generated.
100 If not empty, password is encoded with
104 Perhaps you're missing what
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.
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
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
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)
124 Read internal variables.
126 Read configuration file (/etc/adduser.conf).
128 Parse command line options.
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
143 directory of new users,
149 specified is equal to
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
162 .It Sy -group Ar login_group
165 means that the username is to be used as login group.
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
173 Specifying a value of
177 causes no message to be sent to new users.
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.
189 Many warnings, questions. Recommended for novice users.
191 .Bl -tag -width Ds -compact
194 .It Sy configuration file
196 reads and writes this file.
198 .Pa /etc/adduser.conf
201 Eval variables in this file. See
202 .Pa /etc/adduser.message
207 .Bl -tag -width /etc/master.passwdxx -compact
208 .It Pa /etc/master.passwd
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