1
Goal: Add missing documentation of options in useradd, groupadd and
3
Implement the -r, --system option of newusers (already documented in
4
--help, implemented in code, but missing getopt handling)
6
Status wrt upstream: Already applied.
8
Index: shadow-4.1.1/man/useradd.8.xml
9
===================================================================
10
--- shadow-4.1.1.orig/man/useradd.8.xml 2008-06-12 23:29:12.210795802 +0200
11
+++ shadow-4.1.1/man/useradd.8.xml 2008-06-12 23:29:12.258795502 +0200
16
- <option>-m</option>, <option>--create-home</option>
17
+ <option>-k</option>, <option>--skel</option>
18
+ <replaceable>SKEL_DIR</replaceable>
22
- The user's home directory will be created if it does not exist.
23
- The files contained in <replaceable>SKEL_DIR</replaceable> will
24
- be copied to the home directory if the <option>-k</option>
25
- option is used, otherwise the files contained in
26
- <filename>/etc/skel</filename> will be used instead. Any
27
- directories contained in <replaceable>SKEL_DIR</replaceable> or
28
- <filename>/etc/skel</filename> will be created in the user's
29
- home directory as well. The <option>-k</option> option is only
30
- valid in conjunction with the <option>-m</option> option. The
31
- default is to not create the directory and to not copy any
33
- This option may not function correctly if the username has a / in it.
34
+ The skeleton directory, which contains files and directories
35
+ to be copied in the user's home directory, when the home
36
+ directory is created by <command>useradd</command>.
39
+ This option is only valid if the <option>-m</option> (or
40
+ <option>--create-home</option>) option is specified.
43
+ If this option is not set, the skeleton directory is defined
44
+ in <filename>/etc/default/useradd</filename> or, by default,
45
+ <filename>/etc/skel</filename>.
47
+ <para>This option may not function correctly if the username has a / in it.</para>
55
+ <option>-m</option>, <option>--create-home</option>
59
+ Create the user's home directory if it does not exist.
60
+ The files and directories contained in the skeleton directory
61
+ (which can be defined with the <option>-k</option> option)
62
+ will be copied to the home directory.
65
+ By default, no home directories are created.
71
<option>-N</option>, <option>--no-user-group</option>
78
+ <option>-r</option>, <option>--system</option>
82
+ Create a system account.
85
+ System users will be created with no aging information in
86
+ <filename>/etc/shadow</filename>, and their numeric
87
+ identifiers are choosen in the
88
+ <option>SYS_UID_MIN</option>-<option>SYS_UID_MAX</option>
89
+ range, defined in <filename>login.defs</filename>, instead of
90
+ <option>UID_MIN</option>-<option>UID_MAX</option> (and their
91
+ <option>GID</option> counterparts for the creation of groups).
97
<option>-s</option>, <option>--shell</option>
98
<replaceable>SHELL</replaceable>
100
Index: shadow-4.1.1/man/groupadd.8.xml
101
===================================================================
102
--- shadow-4.1.1.orig/man/groupadd.8.xml 2008-02-25 22:14:56.000000000 +0100
103
+++ shadow-4.1.1/man/groupadd.8.xml 2008-06-12 23:29:12.258795502 +0200
110
+ <option>-r</option>, <option>--system</option>
114
+ Create a system group.
117
+ The numeric identifiers of new system groups are choosen in
118
+ the <option>SYS_GID_MIN</option>-<option>SYS_GID_MAX</option>
119
+ range, defined in <filename>login.defs</filename>, instead of
120
+ <option>GID_MIN</option>-<option>GID_MAX</option>.
127
Index: shadow-4.1.1/man/newusers.8.xml
128
===================================================================
129
--- shadow-4.1.1.orig/man/newusers.8.xml 2008-02-25 22:14:56.000000000 +0100
130
+++ shadow-4.1.1/man/newusers.8.xml 2008-06-12 23:29:12.258795502 +0200
135
+ <refsect1 id='options'>
136
+ <title>OPTIONS</title>
137
+ <para>The options which apply to the <command>newusers</command> command are:
139
+ <variablelist remap='IP'>
141
+ <term><option>-c</option>, <option>--crypt-method</option></term>
143
+ <para>Use the specified method to encrypt the passwords.</para>
145
+ The available methods are DES, MD5, NONE, and SHA256 or SHA512
146
+ if your libc support these methods.
152
+ <option>-r</option>, <option>--system</option>
156
+ Create a system account.
159
+ System users will be created with no aging information in
160
+ <filename>/etc/shadow</filename>, and their numeric
161
+ identifiers are choosen in the
162
+ <option>SYS_UID_MIN</option>-<option>SYS_UID_MAX</option>
163
+ range, defined in <filename>login.defs</filename>, instead of
164
+ <option>UID_MIN</option>-<option>UID_MAX</option> (and their
165
+ <option>GID</option> counterparts for the creation of groups).
169
+ <varlistentry condition="sha_crypt">
170
+ <term><option>-s</option>, <option>--sha-rounds</option></term>
173
+ Use the specified number of rounds to encrypt the passwords.
176
+ The value 0 means that the system will choose the default
177
+ number of rounds for the crypt method (5000).
180
+ A minimal value of 1000 and a maximal value of 999,999,999
184
+ You can only use this option with the SHA256 or SHA512
188
+ By default, the number of rounds is defined by the
189
+ SHA_CRYPT_MIN_ROUNDS and SHA_CRYPT_MAX_ROUNDS variables in
190
+ <filename>/etc/login.defs</filename>.
197
<refsect1 id='caveats'>
198
<title>CAVEATS</title>
200
Index: shadow-4.1.1/src/newusers.c
201
===================================================================
202
--- shadow-4.1.1.orig/src/newusers.c 2008-06-12 23:34:34.859795564 +0200
203
+++ shadow-4.1.1/src/newusers.c 2008-06-12 23:38:33.290795654 +0200
205
static struct option long_options[] = {
206
{"crypt-method", required_argument, NULL, 'c'},
207
{"help", no_argument, NULL, 'h'},
208
+ {"system", no_argument, NULL, 'r'},
210
{"sha-rounds", required_argument, NULL, 's'},
214
while ((c = getopt_long (argc, argv,
222
long_options, &option_index)) != -1) {