1.\" 2.\" (c) Copyright 1995 Wolfram Schneider. 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.\" 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 17.\" 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. 28.\" 29.\" /usr/sbin/adduser - add new user(s) 30.\" 31.\" Bugs: sure (my english!) 32.\" Email: Wolfram Schneider <wosch@cs.tu-berlin.de> 33.\" 34.\" $Id: adduser.8,v 1.5 1995/03/07 16:42:33 w Exp w $ 35.\" 36 37.Dd Jan, 9, 1995 38.Dt ADDUSER 8 39.Os FreeBSD 2.1 40.Sh NAME 41.Nm adduser 42.Nd command for adding new users 43 44.Sh SYNOPSIS 45.Nm adduser 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] 51 52 53.Sh DESCRIPTION 54.Nm Adduser 55is a simple program for adding new users. Adduser check 56passwd, group and shell database. It create passwd/group entry, 57HOME-directory, dotfiles and send new user a welcome message. 58 59.Sh RESTRICTION 60.Bl -tag -width Ds -compact 61.It Sy username 62Login name. Only lowercase characters or digits. 63.It Sy fullname 64Firstname and surname. 65.Ql Pa \: 66not allowed. 67.It Sy shell 68Only valid shells from shell database or sliplogin and pppd 69.It Sy uid 70Automatic generated or your choise. Less than 32000. 71.It Sy gid/login group 72Your choise or automatic generated. 73.It Sy password 74If not empty password is encoded with crypt. 75.El 76 77.Sh UNIQ GROUP 78Perhaps your missing what *can* be done with this scheme that falls apart 79with most other schemes. With each user in his/her own group the user can 80safely run with a umask of 002 and have files created in there home directory 81and not worry about others being able to read them. 82 83For a shared area you create a seperate uid/gid (like cvs or ncvs on freefall), 84you place each person that should be able to access this area into that new 85group. 86 87This model of uid/gid administration allows far greater flexibilty that lumping 88users into groups and having to muck with the umask when working in a shared 89area. 90 91I have been using this model for almost 10 years and found that it works 92for most situations, and has never gotten in the way. (Rod Grimes) 93 94.Sh CONFIGURATION 95.Bl -tag -width Ds -compact 96.It Sy 1. 97Read intern variables. 98.It Sy 2. 99Read config file (/etc/adduser.conf) 100.It Sy 3. 101Parse command line options 102.El 103 104.Sh OPTIONS 105.Bl -tag -width Ds 106.It Sy -batch username [group[,group]...] [fullname] [password] 107Batch mode. 108 109.It Sy -check_only 110Check /etc/passwd, /etc/group, /etc/shells and exit. 111 112.It Sy -create_config 113Create new config and message file and exit. 114 115.It Sy -dotdir Ar directory 116Copy files from 117.Ar directory 118into the HOME-directory of new users. 119.Ql Pa dot.foo 120files renamed to 121.Ql Pa .foo 122Don't copy files if 123.Ar directory 124equal with 125.Ar no 126For security make a all files writable and readable for owner, 127don't allow group or world to write files and allow only owner 128to read/execute/write .rhost, .Xauthority, .kermrc, .netrc, Mail, 129prv, iscreen, term. 130 131.It Sy -group Ar login_group 132Login group. 133.Ar USER 134mean use username as login group. 135 136.It Sy -help,-h,-? 137Print options and exit. 138 139.It Sy -home Ar partition 140Default home partition where all users located. 141 142.It Sy -message Ar file 143Send new users a welcome message. 144Don't send message if 145.Ar file 146equal with 147.Ar no 148 149.It Sy -noconfig 150Do not read config file. 151 152.It Sy -shell Ar shell 153Default shell for new users. 154 155.It Sy -silent,-s,-quit,-q 156Few warnings, question, bugreports. 157 158.It Sy -uid Ar uid 159Use uid's from 160.Ar uid 161up. 162 163.It Sy -verbose,-v 164Many warning, question. Recommended for noivice users. 165 166 167 168.Sh FORMATS 169.Bl -tag -width Ds -compact 170.Ql Pa # 171is a comment. 172 173.P 174.It Sy config file 175.Nm Adduser 176read and write this file. 177See /etc/adduser.conf for more details. 178.It Sy message file 179Eval variables in this file. See /etc/adduser.message for more 180details. 181.El 182 183.Sh EXAMPLES 184.Pp 185$ adduser 186.Pp 187Start adduser in interactive mode. 188 189.Pp 190$ adduser -batch baerenklau guest,staff,baer 'Teddy II' qwerty7 191.Pp 192Create user 'baerenklau' and login group 'baerenklau'. Invite user 193baerenklau into groups guest, staff and baer. Realname (fullname) 194is 'Teddy II'. Password is 'qwerty7' (don't use such password!). Create 195HOME directory '/home/baerenklau' and copy all files and directories 196from /usr/share/skel to /home/baerenklau. Send user baerenklau 197a welcome message. 198 199.Pp 200$ adduser -uid 5000 -group guest -message no -batch vehlefanz 201.Pp 202Create user 'vehlefanz'. Login group is guest. Uid is up to 2035000, for instance 5007. No other groups, no realname, no password. 204Do not send a welcome message. 205 206.Sh FILES 207.Bl -tag -width /etc/master.passwdxx -compact 208.It Pa /etc/master.passwd 209user database 210.It Pa /etc/group 211group database 212.It Pa /etc/shells 213shell database 214.It Pa /etc/adduser.conf 215config file for adduser 216.It Pa /etc/adduser.message 217message file for adduser 218.It Pa /usr/share/skel 219skeletal login directory 220.It Pa /var/log/adduser 221logfile for adduser 222.El 223 224.Sh SEE ALSO 225.Xr chpass 1 , 226.Xr finger 1 , 227.Xr passwd 1 , 228.Xr aliases 5 , 229.Xr passwd 5 , 230.Xr group 5 , 231.Xr shells 5 , 232.Xr pwd_mkdb 8 , 233.Xr vipw 8 234 235.\" .Sh BUGS 236 237.Sh HISTORY 238The 239.Nm 240command appeared in FreeBSD 2.1 241 242.\" .Sh AUTHOR 243.\" Wolfram Schneider, Berlin 244