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.12 1996/08/28 17:54:13 adam Exp $
32 .Nd command for adding new users
36 [-batch username [group[,group]...] [fullname] [password]]
37 [-check_only] [-config_create] [-dotdir dotdir]
38 [-group login_group] [-h|-help] [-home home]
39 [-message message_file] [-noconfig] [-shell shell]
40 [-s|-silent|-q|-quit] [-uid uid_start] [-v|-verbose]
45 is a simple program for adding new users. Adduser checks
46 passwd, group and shell database. It creates passwd/group entry,
47 HOME-directory, dotfiles and sends new user a welcome message.
50 .Bl -tag -width Ds -compact
52 Login name. Only lowercase characters or digits. Maximum length
56 The reasons for this limit are "Historical".
57 Given that people have traditionally wanted to break this
58 limit for aesthetic reasons, it's never been of great importance to break
59 such a basic fundamental parameter in UNIX.
60 You can change UT_NAMESIZE in /usr/include/utmp.h and recompile the
61 world; people have done this and it works, but you will have problems
62 with any precompiled programs, or source that assumes the 8-character
63 name limit and NIS. The NIS protocol mandates an 8-character username.
64 If you need a longer login name for e-mail addresses,
65 you can define an alias in
68 Firstname and surname.
72 Only valid shells from shell database or sliplogin and pppd
74 Automatically generated or your choice, less than 32000.
75 .It Sy gid/login group
76 Your choice or automatically generated.
78 If not empty, password is encoded with crypt.
82 Perhaps you're missing what *can* be done with this scheme that falls apart
83 with most other schemes. With each user in his/her own group the user can
84 safely run with a umask of 002 and have files created in their home directory
85 and not worry about others being able to read them.
87 For a shared area you create a separate uid/gid (like cvs or ncvs on freefall),
88 you place each person that should be able to access this area into that new
91 This model of uid/gid administration allows far greater flexibility than lumping
92 users into groups and having to muck with the umask when working in a shared
95 I have been using this model for almost 10 years and found that it works
96 for most situations, and has never gotten in the way. (Rod Grimes)
99 .Bl -tag -width Ds -compact
101 Read intern variables.
103 Read config file (/etc/adduser.conf)
105 Parse command line options
110 .It Sy -batch username [group[,group]...] [fullname] [password]
114 Check /etc/passwd, /etc/group, /etc/shells and exit.
116 .It Sy -create_config
117 Create new config and message file and exit.
119 .It Sy -dotdir Ar directory
122 into the HOME-directory of new users,
130 For security make all files writable and readable for owner,
131 don't allow group or world to write files and allow only owner
132 to read/execute/write .rhost, .Xauthority, .kermrc, .netrc, Mail,
135 .It Sy -group Ar login_group
138 means use username as login group.
141 Print options and exit.
143 .It Sy -home Ar partition
144 Default home partition where all users located.
146 .It Sy -message Ar file
147 Send new users a welcome message.
148 Don't send message if
154 Do not read config file.
156 .It Sy -shell Ar shell
157 Default shell for new users.
159 .It Sy -silent,-s,-quit,-q
160 Few warnings, question, bug reports.
168 Many warning, question. Recommended for novice users.
173 .Bl -tag -width Ds -compact
180 reads and writes this file.
181 See /etc/adduser.conf for more details.
183 Eval variables in this file. See /etc/adduser.message for more
191 Start adduser in interactive mode.
194 $ adduser -batch baerenklau guest,staff,baer 'Teddy II' qwerty7
196 Create user 'baerenklau' and login group 'baerenklau'. Invite user
197 baerenklau into groups guest, staff and baer. Realname (fullname)
198 is 'Teddy II'. Password is 'qwerty7' (don't use such password!). Create
199 HOME directory '/home/baerenklau' and copy all files and directories
200 from /usr/share/skel to /home/baerenklau. Send user baerenklau
204 $ adduser -uid 5000 -group guest -message no -batch vehlefanz
206 Create user 'vehlefanz'. Login group is guest. Uid is up to
207 5000, for instance 5007. No other groups, no realname, no password.
208 Do not send a welcome message.
211 .Bl -tag -width /etc/master.passwdxx -compact
212 .It Pa /etc/master.passwd
218 .It Pa /etc/adduser.conf
219 config file for adduser
220 .It Pa /etc/adduser.message
221 message file for adduser
222 .It Pa /usr/share/skel
223 skeletal login directory
224 .It Pa /var/log/adduser