]> git.cameronkatri.com Git - pw-darwin.git/blob - adduser/adduser.8
o more options
[pw-darwin.git] / adduser / adduser.8
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
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.
58
59 .Sh RESTRICTION
60 .Bl -tag -width Ds -compact
61 .It Sy username
62 Login name. Only lowercase characters or digits.
63 .It Sy fullname
64 Firstname and surname.
65 .Ql Pa \:
66 not allowed.
67 .It Sy shell
68 Only valid shells from shell database or sliplogin and pppd
69 .It Sy uid
70 Automatic generated or your choise. Less than 32000.
71 .It Sy gid/login group
72 Your choise or automatic generated.
73 .It Sy password
74 If not empty password is encoded with crypt.
75 .El
76
77 .Sh UNIQ GROUP
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.
82
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
85 group.
86
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
89 area.
90
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)
93
94 .Sh CONFIGURATION
95 .Bl -tag -width Ds -compact
96 .It Sy 1.
97 Read intern variables.
98 .It Sy 2.
99 Read config file (/etc/adduser.conf)
100 .It Sy 3.
101 Parse command line options
102 .El
103
104 .Sh OPTIONS
105 .Bl -tag -width Ds
106 .It Sy -batch username [group[,group]...] [fullname] [password]
107 Batch mode.
108
109 .It Sy -check_only
110 Check /etc/passwd, /etc/group, /etc/shells and exit.
111
112 .It Sy -create_config
113 Create new config and message file and exit.
114
115 .It Sy -dotdir Ar directory
116 Copy files from
117 .Ar directory
118 into the HOME-directory of new users.
119 .Ql Pa dot.foo
120 files renamed to
121 .Ql Pa .foo
122 Don't copy files if
123 .Ar directory
124 equal with
125 .Ar no
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,
129 prv, iscreen, term.
130
131 .It Sy -group Ar login_group
132 Login group.
133 .Ar USER
134 mean use username as login group.
135
136 .It Sy -help,-h,-?
137 Print options and exit.
138
139 .It Sy -home Ar partition
140 Default home partition where all users located.
141
142 .It Sy -message Ar file
143 Send new users a welcome message.
144 Don't send message if
145 .Ar file
146 equal with
147 .Ar no
148
149 .It Sy -noconfig
150 Do not read config file.
151
152 .It Sy -shell Ar shell
153 Default shell for new users.
154
155 .It Sy -silent,-s,-quit,-q
156 Few warnings, question, bugreports.
157
158 .It Sy -uid Ar uid
159 Use uid's from
160 .Ar uid
161 up.
162
163 .It Sy -verbose,-v
164 Many warning, question. Recommended for noivice users.
165
166
167
168 .Sh FORMATS
169 .Bl -tag -width Ds -compact
170 .Ql Pa #
171 is a comment.
172
173 .P
174 .It Sy config file
175 .Nm Adduser
176 read and write this file.
177 See /etc/adduser.conf for more details.
178 .It Sy message file
179 Eval variables in this file. See /etc/adduser.message for more
180 details.
181 .El
182
183 .Sh EXAMPLES
184 .Pp
185 $ adduser
186 .Pp
187 Start adduser in interactive mode.
188
189 .Pp
190 $ adduser -batch baerenklau guest,staff,baer 'Teddy II' qwerty7
191 .Pp
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
197 a welcome message.
198
199 .Pp
200 $ adduser -uid 5000 -group guest -message no -batch vehlefanz
201 .Pp
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.
205
206 .Sh FILES
207 .Bl -tag -width /etc/master.passwdxx -compact
208 .It Pa /etc/master.passwd
209 user database
210 .It Pa /etc/group
211 group database
212 .It Pa /etc/shells
213 shell database
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
221 logfile 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
238 The
239 .Nm
240 command appeared in FreeBSD 2.1
241
242 .\" .Sh AUTHOR
243 .\" Wolfram Schneider, Berlin