2 .\" (c) Copyright 1995 Wolfram Schneider. 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.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by Wolfram Schneider
15 .\" 4. The name of the author may not be used to endorse or promote products
16 .\" derived from this software without specific prior written permission
18 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 .\" /usr/sbin/adduser - add new user(s)
31 .\" Bugs: sure (my english!)
32 .\" Email: Wolfram Schneider <wosch@cs.tu-berlin.de>
34 .\" $Id: adduser.8,v 1.5 1995/03/07 16:42:33 w Exp w $
42 .Nd command for adding new users
46 [-batch username [group[,group]...] [fullname] [password]]
47 [-check_only] [-config_create] [-dotdir dotdir]
48 [-group login_group] [-h|-help] [-home home]
49 [-message message_file] [-noconfig] [-shell shell]
50 [-s|-silent|-q|-quit] [-uid uid_start] [-v|-verbose]
55 is a simple program for adding new users. Adduser check
56 passwd, group and shell database. It create passwd/group entry,
57 HOME-directory, dotfiles and send new user a welcome message.
60 .Bl -tag -width Ds -compact
62 Login name. Only lowercase characters or digits.
64 Firstname and surname.
68 Only valid shells from shell database or sliplogin and pppd
70 Automatic generated or your choise. Less than 32000.
71 .It Sy gid/login group
72 Your choise or automatic generated.
74 If not empty password is encoded with crypt.
78 Perhaps your missing what *can* be done with this scheme that falls apart
79 with most other schemes. With each user in his/her own group the user can
80 safely run with a umask of 002 and have files created in there home directory
81 and not worry about others being able to read them.
83 For a shared area you create a seperate uid/gid (like cvs or ncvs on freefall),
84 you place each person that should be able to access this area into that new
87 This model of uid/gid administration allows far greater flexibilty that lumping
88 users into groups and having to muck with the umask when working in a shared
91 I have been using this model for almost 10 years and found that it works
92 for most situations, and has never gotten in the way. (Rod Grimes)
95 .Bl -tag -width Ds -compact
97 Read intern variables.
99 Read config file (/etc/adduser.conf)
101 Parse command line options
106 .It Sy -batch username [group[,group]...] [fullname] [password]
110 Check /etc/passwd, /etc/group, /etc/shells and exit.
112 .It Sy -create_config
113 Create new config and message file and exit.
115 .It Sy -dotdir Ar directory
118 into the HOME-directory of new users.
126 For security make a all files writable and readable for owner,
127 don't allow group or world to write files and allow only owner
128 to read/execute/write .rhost, .Xauthority, .kermrc, .netrc, Mail,
131 .It Sy -group Ar login_group
134 mean use username as login group.
137 Print options and exit.
139 .It Sy -home Ar partition
140 Default home partition where all users located.
142 .It Sy -message Ar file
143 Send new users a welcome message.
144 Don't send message if
150 Do not read config file.
152 .It Sy -shell Ar shell
153 Default shell for new users.
155 .It Sy -silent,-s,-quit,-q
156 Few warnings, question, bugreports.
164 Many warning, question. Recommended for noivice users.
169 .Bl -tag -width Ds -compact
176 read and write this file.
177 See /etc/adduser.conf for more details.
179 Eval variables in this file. See /etc/adduser.message for more
187 Start adduser in interactive mode.
190 $ adduser -batch baerenklau guest,staff,baer 'Teddy II' qwerty7
192 Create user 'baerenklau' and login group 'baerenklau'. Invite user
193 baerenklau into groups guest, staff and baer. Realname (fullname)
194 is 'Teddy II'. Password is 'qwerty7' (don't use such password!). Create
195 HOME directory '/home/baerenklau' and copy all files and directories
196 from /usr/share/skel to /home/baerenklau. Send user baerenklau
200 $ adduser -uid 5000 -group guest -message no -batch vehlefanz
202 Create user 'vehlefanz'. Login group is guest. Uid is up to
203 5000, for instance 5007. No other groups, no realname, no password.
204 Do not send a welcome message.
207 .Bl -tag -width /etc/master.passwdxx -compact
208 .It Pa /etc/master.passwd
214 .It Pa /etc/adduser.conf
215 config file for adduser
216 .It Pa /etc/adduser.message
217 message file for adduser
218 .It Pa /usr/share/skel
219 skeletal login directory
220 .It Pa /var/log/adduser
240 command appeared in FreeBSD 2.1
243 .\" Wolfram Schneider, Berlin