~ubuntu-branches/ubuntu/raring/shadow/raring-proposed

« back to all changes in this revision

Viewing changes to man/sv/newusers.8

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2009-05-05 09:45:21 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090505094521-wpk2wn3q7957tlah
Tags: 1:4.1.3.1-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Ubuntu specific:
    + debian/login.defs: use SHA512 by default for password crypt routine.
  - debian/patches/stdout-encrypted-password.patch: chpasswd can report
    password hashes on stdout (debian bug 505640).
  - debian/login.pam: Enable SELinux support (debian bug 527106).
  - debian/securetty.linux: support Freescale MX-series (debian bug 527095).
* Add debian/patches/300_lastlog_failure: fixed upstream (debian bug 524873).
* Drop debian/patches/593_omit_lastchange_field_if_clock_is_misset: fixed
  upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
.\"     Title: newusers
2
2
.\"    Author: 
3
3
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
4
 
.\"      Date: 03-04-2008
 
4
.\"      Date: 15-04-2009
5
5
.\"    Manual: Systemhanteringskommandon
6
6
.\"    Source: Systemhanteringskommandon
7
7
.\"
8
 
.TH "NEWUSERS" "8" "03-04-2008" "Systemhanteringskommandon" "Systemhanteringskommandon"
 
8
.TH "NEWUSERS" "8" "15-04-2009" "Systemhanteringskommandon" "Systemhanteringskommandon"
9
9
.\" disable hyphenation
10
10
.nh
11
11
.\" disable justification (adjust text to left margin only)
19
19
.PP
20
20
The
21
21
\fBnewusers\fR
22
 
command reads a file of user name and clear\-text password pairs and uses this information to update a group of existing users or to create new users\. Each line is in the same format as the standard password file (see
23
 
\fBpasswd\fR(5)) with the following exceptions:
 
22
command reads a file of user name and clear\-text password pairs and uses this information to update a group of existing users or to create new users\&. Each line is in the same format as the standard password file (see
 
23
\fBpasswd\fR(5)) with the exceptions explained below:
 
24
.PP
 
25
pw_name:pw_passwd:pw_uid:pw_gid:pw_gecos:pw_dir:pw_shell
 
26
.PP
 
27
\fIpw_name\fR
 
28
.RS 4
 
29
This is the name of the user\&.
 
30
.sp
 
31
It can be the name of a new user or the name of an existing user (or an user created before by
 
32
\fBnewusers\fR)\&. In case of an existing user, the user\'s information will be changed, otherwise a new user will be created\&.
 
33
.RE
24
34
.PP
25
35
\fIpw_passwd\fR
26
36
.RS 4
27
 
Detta fält kommer att krypteras och användas som det nya värdet för det krypterade lösenordet\.
 
37
Detta fält kommer att krypteras och användas som det nya värdet för det krypterade lösenordet\&.
 
38
.RE
 
39
.PP
 
40
\fIpw_uid\fR
 
41
.RS 4
 
42
This field is used to define the UID of the user\&.
 
43
.sp
 
44
If the field is empty, an new (unused) UID will be defined automatically by
 
45
\fBnewusers\fR\&.
 
46
.sp
 
47
If this field contains a number, this number will be used as the UID\&.
 
48
.sp
 
49
If this field contains the name of an existing user (or the name of an user created before by
 
50
\fBnewusers\fR), the UID of the specified user will be used\&.
28
51
.RE
29
52
.PP
30
53
\fIpw_gid\fR
31
54
.RS 4
32
 
This field must contain the name (or number) of a group\. The user will be added as a member to this group\. When a non\-existent group name or number is specified, a new group will be created\. In the case of a non\-existent group number, both the name and the number of the new group will be this number\.
 
55
This field is used to define the primary group ID for the user\&.
 
56
.sp
 
57
If this field contains the name of an existing group (or a group created before by
 
58
\fBnewusers\fR), the GID of this group will be used as the primary group ID for the user\&.
 
59
.sp
 
60
If this field is a number, this number will be used as the primary group ID of the user\&. If no groups exist with this GID, a new group will be created with this GID, and the name of the user\&.
 
61
.sp
 
62
If this field is empty, a new group will be created with the name of the user and a GID will be automatically defined by
 
63
\fBnewusers\fR
 
64
to be used as the primary group ID for the user and as the GID for the new group\&.
 
65
.sp
 
66
If this field contains the name of a group which does not exist (and was not created earlier wbefore by
 
67
\fBnewusers\fR), a new group will be created with the specified name and a GID will be automatically defined by
 
68
\fBnewusers\fR
 
69
to be used as the primary group ID for the user and Gs the ID for the new group\&.
 
70
.RE
 
71
.PP
 
72
\fIpw_gecos\fR
 
73
.RS 4
 
74
This field is copied in the GECOS field of the user\&.
33
75
.RE
34
76
.PP
35
77
\fIpw_dir\fR
36
78
.RS 4
37
 
This field will be checked for existence as a directory, and a new directory with this name will be created if it does not already exist\. The ownership of the directory will be set to be that of the user being created or updated\.
38
 
.RE
39
 
.PP
40
 
Detta kommando är tänkt att användas i större systemmiljöer där många konton uppdateras på samma gång\.
 
79
This field is used to define the home directory of the user\&.
 
80
.sp
 
81
If this field does not specify an existing directory, the specified directory is created, with ownership set to the user being created or updated and its primary group\&.
 
82
.RE
 
83
.PP
 
84
\fIpw_shell\fR
 
85
.RS 4
 
86
This field defines the shell of the user\&. No checks are performed on this field\&.
 
87
.RE
 
88
.PP
 
89
 
 
90
\fBnewusers\fR
 
91
first tries to create or change all the specified users, and then write these changes to the user or group databases\&. If an error occurs (except in the final writes to the databases), no changes are committed to the databases\&.
 
92
.PP
 
93
Detta kommando är tänkt att användas i större systemmiljöer där många konton uppdateras på samma gång\&.
 
94
.SH "FLAGGOR"
 
95
.PP
 
96
The options which apply to the
 
97
\fBnewusers\fR
 
98
command are:
 
99
.PP
 
100
\fB\-c\fR, \fB\-\-crypt\-method\fR
 
101
.RS 4
 
102
Use the specified method to encrypt the passwords\&.
 
103
.sp
 
104
The available methods are DES, MD5, NONE, and SHA256 or SHA512 if your libc support these methods\&.
 
105
.RE
 
106
.PP
 
107
\fB\-r\fR, \fB\-\-system\fR
 
108
.RS 4
 
109
Create a system account\&.
 
110
.sp
 
111
System users will be created with no aging information in
 
112
\fI/etc/shadow\fR, and their numeric identifiers are choosen in the
 
113
\fBSYS_UID_MIN\fR\-\fBSYS_UID_MAX\fR
 
114
range, defined in
 
115
\fIlogin\&.defs\fR, instead of
 
116
\fBUID_MIN\fR\-\fBUID_MAX\fR
 
117
(and their
 
118
\fBGID\fR
 
119
counterparts for the creation of groups)\&.
 
120
.RE
 
121
.PP
 
122
\fB\-s\fR, \fB\-\-sha\-rounds\fR
 
123
.RS 4
 
124
Use the specified number of rounds to encrypt the passwords\&.
 
125
.sp
 
126
The value 0 means that the system will choose the default number of rounds for the crypt method (5000)\&.
 
127
.sp
 
128
A minimal value of 1000 and a maximal value of 999,999,999 will be enforced\&.
 
129
.sp
 
130
You can only use this option with the SHA256 or SHA512 crypt method\&.
 
131
.sp
 
132
By default, the number of rounds is defined by the SHA_CRYPT_MIN_ROUNDS and SHA_CRYPT_MAX_ROUNDS variables in
 
133
\fI/etc/login\&.defs\fR\&.
 
134
.RE
41
135
.SH "TÄNK PÅ"
42
136
.PP
43
 
Inmatningsfilen måste skyddas eftersom den innehåller okrypterade lösenord\.
44
 
.PP
45
 
PAM is not used to update the passwords\. Only
46
 
\fI/etc/passwd\fR
47
 
and
48
 
\fI/etc/shadow\fR
49
 
are updated, and the various checks or options provided by PAM modules are not used\.
 
137
Inmatningsfilen måste skyddas eftersom den innehåller okrypterade lösenord\&.
50
138
.SH "CONFIGURATION"
51
139
.PP
52
140
The following configuration variables in
53
 
\fI/etc/login\.defs\fR
 
141
\fI/etc/login\&.defs\fR
54
142
change the behavior of this tool:
55
143
.PP
56
144
\fBENCRYPT_METHOD\fR (string)
57
145
.RS 4
58
 
This defines the system default encryption algorithm for encrypting passwords (if no algorithm are specified on the command line)\.
 
146
This defines the system default encryption algorithm for encrypting passwords (if no algorithm are specified on the command line)\&.
59
147
.sp
60
148
It can take one of these values:
61
149
.sp
79
167
.sp
80
168
Note: this parameter overrides the
81
169
\fBMD5_CRYPT_ENAB\fR
82
 
variable\.
 
170
variable\&.
83
171
.sp
84
 
Note: if you use PAM, it is recommended to set this variable consistently with the PAM modules configuration\.
 
172
Note: if you use PAM, it is recommended to set this variable consistently with the PAM modules configuration\&.
85
173
.RE
86
174
.PP
87
175
\fBGID_MAX\fR (number), \fBGID_MIN\fR (number)
89
177
Range of group IDs used for the creation of regular groups by
90
178
\fBuseradd\fR,
91
179
\fBuseradd\fR, or
92
 
\fBnewusers\fR\.
 
180
\fBnewusers\fR\&.
93
181
.RE
94
182
.PP
95
183
\fBMAX_MEMBERS_PER_GROUP\fR (number)
96
184
.RS 4
97
 
Maximum members per group entry\. When the maximum is reached, a new group entry (line) is started in
 
185
Maximum members per group entry\&. When the maximum is reached, a new group entry (line) is started in
98
186
\fI/etc/group\fR
99
 
(with the same name, same password, and same GID)\.
100
 
.sp
101
 
The default value is 0, meaning that there are no limits in the number of members in a group\.
102
 
.sp
103
 
This feature (split group) permits to limit the length of lines in the group file\. This is useful to make sure that lines for NIS groups are not larger than 1024 characters\.
104
 
.sp
105
 
If you need to enforce such limit, you can use 25\.
106
 
.sp
107
 
Note: split groups may not be supported by all tools (even in the Shadow toolsuite\. You should not use this variable unless you really need it\.
 
187
(with the same name, same password, and same GID)\&.
 
188
.sp
 
189
The default value is 0, meaning that there are no limits in the number of members in a group\&.
 
190
.sp
 
191
This feature (split group) permits to limit the length of lines in the group file\&. This is useful to make sure that lines for NIS groups are not larger than 1024 characters\&.
 
192
.sp
 
193
If you need to enforce such limit, you can use 25\&.
 
194
.sp
 
195
Note: split groups may not be supported by all tools (even in the Shadow toolsuite)\&. You should not use this variable unless you really need it\&.
108
196
.RE
109
197
.PP
110
198
\fBMD5_CRYPT_ENAB\fR (boolean)
111
199
.RS 4
112
 
Indicate if passwords must be encrypted using the MD5\-based algorithm\. If set to
113
 
\fIyes\fR, new passwords will be encrypted using the MD5\-based algorithm compatible with the one used by recent releases of FreeBSD\. It supports passwords of unlimited length and longer salt strings\. Set to
 
200
Indicate if passwords must be encrypted using the MD5\-based algorithm\&. If set to
 
201
\fIyes\fR, new passwords will be encrypted using the MD5\-based algorithm compatible with the one used by recent releases of FreeBSD\&. It supports passwords of unlimited length and longer salt strings\&. Set to
114
202
\fIno\fR
115
 
if you need to copy encrypted passwords to other systems which don\'t understand the new algorithm\. Default is
116
 
\fIno\fR\.
 
203
if you need to copy encrypted passwords to other systems which don\'t understand the new algorithm\&. Default is
 
204
\fIno\fR\&.
117
205
.sp
118
206
This variable is superceded by the
119
207
\fBENCRYPT_METHOD\fR
120
 
variable or by any command line option used to configure the encryption algorithm\.
121
 
.sp
122
 
This variable is deprecated\. You should use
123
 
\fBENCRYPT_METHOD\fR\.
124
 
.sp
125
 
Note: if you use PAM, it is recommended to set this variable consistently with the PAM modules configuration\.
 
208
variable or by any command line option used to configure the encryption algorithm\&.
 
209
.sp
 
210
This variable is deprecated\&. You should use
 
211
\fBENCRYPT_METHOD\fR\&.
 
212
.sp
 
213
Note: if you use PAM, it is recommended to set this variable consistently with the PAM modules configuration\&.
126
214
.RE
127
215
.PP
128
216
\fBPASS_MAX_DAYS\fR (number)
129
217
.RS 4
130
 
The maximum number of days a password may be used\. If the password is older than this, a password change will be forced\. If not specified, \-1 will be assumed (which disables the restriction)\.
 
218
The maximum number of days a password may be used\&. If the password is older than this, a password change will be forced\&. If not specified, \-1 will be assumed (which disables the restriction)\&.
131
219
.RE
132
220
.PP
133
221
\fBPASS_MIN_DAYS\fR (number)
134
222
.RS 4
135
 
The minimum number of days allowed between password changes\. Any password changes attempted sooner than this will be rejected\. If not specified, \-1 will be assumed (which disables the restriction)\.
 
223
The minimum number of days allowed between password changes\&. Any password changes attempted sooner than this will be rejected\&. If not specified, \-1 will be assumed (which disables the restriction)\&.
136
224
.RE
137
225
.PP
138
226
\fBPASS_WARN_AGE\fR (number)
139
227
.RS 4
140
 
The number of days warning given before a password expires\. A zero means warning is given only upon the day of expiration, a negative value means no warning is given\. If not specified, no warning will be provided\.
 
228
The number of days warning given before a password expires\&. A zero means warning is given only upon the day of expiration, a negative value means no warning is given\&. If not specified, no warning will be provided\&.
141
229
.RE
142
230
.PP
143
231
\fBSHA_CRYPT_MIN_ROUNDS\fR (number), \fBSHA_CRYPT_MAX_ROUNDS\fR (number)
147
235
is set to
148
236
\fISHA256\fR
149
237
or
150
 
\fISHA512\fR, this defines the number of SHA rounds used by the encryption algorithm by default (when the number of rounds is not specified on the command line)\.
151
 
.sp
152
 
With a lot of rounds, it is more difficult to brute forcing the password\. But note also that more CPU resources will be needed to authenticate users\.
153
 
.sp
154
 
If not specified, the libc will choose the default number of rounds (5000)\.
155
 
.sp
156
 
The values must be inside the 1000\-999999999 range\.
 
238
\fISHA512\fR, this defines the number of SHA rounds used by the encryption algorithm by default (when the number of rounds is not specified on the command line)\&.
 
239
.sp
 
240
With a lot of rounds, it is more difficult to brute forcing the password\&. But note also that more CPU resources will be needed to authenticate users\&.
 
241
.sp
 
242
If not specified, the libc will choose the default number of rounds (5000)\&.
 
243
.sp
 
244
The values must be inside the 1000\-999999999 range\&.
157
245
.sp
158
246
If only one of the
159
247
\fBSHA_CRYPT_MIN_ROUNDS\fR
160
248
or
161
249
\fBSHA_CRYPT_MAX_ROUNDS\fR
162
 
values is set, then this value will be used\.
 
250
values is set, then this value will be used\&.
163
251
.sp
164
252
If
165
253
\fBSHA_CRYPT_MIN_ROUNDS\fR
166
254
>
167
 
\fBSHA_CRYPT_MAX_ROUNDS\fR, the highest value will be used\.
 
255
\fBSHA_CRYPT_MAX_ROUNDS\fR, the highest value will be used\&.
168
256
.RE
169
257
.PP
170
258
\fBSYS_GID_MAX\fR (number), \fBSYS_GID_MIN\fR (number)
172
260
Range of group IDs used for the creation of system groups by
173
261
\fBuseradd\fR,
174
262
\fBgroupadd\fR, or
175
 
\fBnewusers\fR\.
 
263
\fBnewusers\fR\&.
176
264
.RE
177
265
.PP
178
266
\fBSYS_UID_MAX\fR (number), \fBSYS_UID_MIN\fR (number)
180
268
Range of user IDs used for the creation of system users by
181
269
\fBuseradd\fR
182
270
or
183
 
\fBnewusers\fR\.
 
271
\fBnewusers\fR\&.
184
272
.RE
185
273
.PP
186
274
\fBUID_MAX\fR (number), \fBUID_MIN\fR (number)
188
276
Range of user IDs used for the creation of regular users by
189
277
\fBuseradd\fR
190
278
or
191
 
\fBnewusers\fR\.
 
279
\fBnewusers\fR\&.
192
280
.RE
193
281
.PP
194
282
\fBUMASK\fR (number)
195
283
.RS 4
196
 
The permission mask is initialized to this value\. If not specified, the permission mask will be initialized to 022\.
 
284
The file mode creation mask is initialized to this value\&. If not specified, the mask will be initialized to 022\&.
 
285
.sp
 
286
 
 
287
\fBuseradd\fR
 
288
and
 
289
\fBnewusers\fR
 
290
use this mask to set the mode of the home directory they create
 
291
.sp
 
292
It is also used by
 
293
\fBlogin\fR
 
294
to define users\' initial umask\&. Note that this mask can be overriden by the user\'s GECOS line (if
 
295
\fBQUOTAS_ENAB\fR
 
296
is set) or by the specification of a limit with the
 
297
\fIK\fR
 
298
identifier in
 
299
\fBlimits\fR(5)\&.
197
300
.RE
198
301
.SH "FILER"
199
302
.PP
200
303
\fI/etc/passwd\fR
201
304
.RS 4
202
 
Användarkontoinformation\.
 
305
Användarkontoinformation\&.
203
306
.RE
204
307
.PP
205
308
\fI/etc/shadow\fR
206
309
.RS 4
207
 
Säker användarkontoinformation\.
 
310
Säker användarkontoinformation\&.
208
311
.RE
209
312
.PP
210
313
\fI/etc/group\fR
211
314
.RS 4
212
 
Gruppkontoinformation\.
 
315
Gruppkontoinformation\&.
213
316
.RE
214
317
.PP
215
318
\fI/etc/gshadow\fR
216
319
.RS 4
217
 
Säker gruppkontoinformation\.
 
320
Säker gruppkontoinformation\&.
218
321
.RE
219
322
.PP
220
 
\fI/etc/login\.defs\fR
 
323
\fI/etc/login\&.defs\fR
221
324
.RS 4
222
 
Shadow password suite configuration\.
 
325
Shadow password suite configuration\&.
223
326
.RE
224
327
.SH "SE OCKSÅ"
225
328
.PP
226
329
\fBlogin.defs\fR(5),
227
330
\fBpasswd\fR(1),
228
 
\fBuseradd\fR(8)\.
 
331
\fBuseradd\fR(8)\&.