~xnox/ubuntu/quantal/shadow/clear-locks

« back to all changes in this revision

Viewing changes to debian/patches/301_manpages_missing_options

  • 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
 
Goal: Add missing documentation of options in useradd, groupadd and
2
 
      newusers
3
 
      Implement the -r, --system option of newusers (already documented in
4
 
      --help, implemented in code, but missing getopt handling)
5
 
 
6
 
Status wrt upstream: Already applied.
7
 
 
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
12
 
@@ -189,23 +189,25 @@
13
 
       </varlistentry>
14
 
       <varlistentry>
15
 
        <term>
16
 
-         <option>-m</option>, <option>--create-home</option>
17
 
+         <option>-k</option>, <option>--skel</option>
18
 
+         <replaceable>SKEL_DIR</replaceable>
19
 
        </term>
20
 
        <listitem>
21
 
          <para>
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
32
 
-           files.
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>.
37
 
+         </para>
38
 
+         <para>
39
 
+           This option is only valid if the <option>-m</option> (or
40
 
+           <option>--create-home</option>) option is specified.
41
 
          </para>
42
 
+         <para>
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>.
46
 
+         </para>
47
 
+         <para>This option may not function correctly if the username has a / in it.</para>
48
 
        </listitem>
49
 
       </varlistentry>
50
 
       <varlistentry>
51
 
@@ -255,6 +257,22 @@
52
 
       </varlistentry>
53
 
       <varlistentry>
54
 
        <term>
55
 
+         <option>-m</option>, <option>--create-home</option>
56
 
+       </term>
57
 
+       <listitem>
58
 
+         <para>
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.
63
 
+         </para>
64
 
+         <para>
65
 
+           By default, no home directories are created.
66
 
+         </para>
67
 
+       </listitem>
68
 
+      </varlistentry>
69
 
+      <varlistentry>
70
 
+       <term>
71
 
          <option>-N</option>, <option>--no-user-group</option>
72
 
        </term>
73
 
        <listitem>
74
 
@@ -295,6 +313,25 @@
75
 
       </varlistentry>
76
 
       <varlistentry>
77
 
        <term>
78
 
+         <option>-r</option>, <option>--system</option>
79
 
+       </term>
80
 
+       <listitem>
81
 
+         <para>
82
 
+           Create a system account.
83
 
+         </para>
84
 
+         <para>
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).
92
 
+         </para>
93
 
+       </listitem>
94
 
+      </varlistentry>
95
 
+      <varlistentry>
96
 
+       <term>
97
 
          <option>-s</option>, <option>--shell</option>
98
 
          <replaceable>SHELL</replaceable>
99
 
        </term>
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
104
 
@@ -126,6 +126,22 @@
105
 
          </para>
106
 
        </listitem>
107
 
       </varlistentry>
108
 
+      <varlistentry>
109
 
+       <term>
110
 
+         <option>-r</option>, <option>--system</option>
111
 
+       </term>
112
 
+       <listitem>
113
 
+         <para>
114
 
+           Create a system group.
115
 
+         </para>
116
 
+         <para>
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>.
121
 
+         </para>
122
 
+       </listitem>
123
 
+      </varlistentry>
124
 
     </variablelist>
125
 
   </refsect1>
126
 
 
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
131
 
@@ -94,6 +94,68 @@
132
 
     </para>
133
 
   </refsect1>
134
 
 
135
 
+  <refsect1 id='options'>
136
 
+    <title>OPTIONS</title>
137
 
+    <para>The options which apply to the <command>newusers</command> command are:
138
 
+    </para>
139
 
+    <variablelist remap='IP'>
140
 
+      <varlistentry>
141
 
+       <term><option>-c</option>, <option>--crypt-method</option></term>
142
 
+       <listitem>
143
 
+         <para>Use the specified method to encrypt the passwords.</para>
144
 
+         <para>
145
 
+           The available methods are DES, MD5, NONE, and SHA256 or SHA512
146
 
+           if your libc support these methods.
147
 
+         </para>
148
 
+       </listitem>
149
 
+      </varlistentry>
150
 
+      <varlistentry>
151
 
+       <term>
152
 
+         <option>-r</option>, <option>--system</option>
153
 
+       </term>
154
 
+       <listitem>
155
 
+         <para>
156
 
+           Create a system account.
157
 
+         </para>
158
 
+         <para>
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).
166
 
+         </para>
167
 
+       </listitem>
168
 
+      </varlistentry>
169
 
+      <varlistentry condition="sha_crypt">
170
 
+       <term><option>-s</option>, <option>--sha-rounds</option></term>
171
 
+       <listitem>
172
 
+         <para>
173
 
+           Use the specified number of rounds to encrypt the passwords.
174
 
+         </para>
175
 
+         <para>
176
 
+           The value 0 means that the system will choose the default
177
 
+           number of rounds for the crypt method (5000).
178
 
+         </para>
179
 
+         <para>
180
 
+           A minimal value of 1000 and a maximal value of 999,999,999
181
 
+           will be enforced.
182
 
+         </para>
183
 
+         <para>
184
 
+           You can only use this option with the SHA256 or SHA512
185
 
+           crypt method.
186
 
+         </para>
187
 
+         <para>
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>.
191
 
+         </para>
192
 
+       </listitem>
193
 
+      </varlistentry>
194
 
+    </variablelist>
195
 
+  </refsect1>
196
 
+
197
 
   <refsect1 id='caveats'>
198
 
     <title>CAVEATS</title>
199
 
     <para>
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
204
 
@@ -443,6 +443,7 @@
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'},
209
 
 #ifdef USE_SHA_CRYPT
210
 
                {"sha-rounds", required_argument, NULL, 's'},
211
 
 #endif
212
 
@@ -451,9 +452,9 @@
213
 
 
214
 
        while ((c = getopt_long (argc, argv,
215
 
 #ifdef USE_SHA_CRYPT
216
 
-                            "c:hs:",
217
 
+                            "c:hrs:",
218
 
 #else
219
 
-                            "c:h",
220
 
+                            "c:hr",
221
 
 #endif
222
 
                             long_options, &option_index)) != -1) {
223
 
                switch (c) {
224
 
@@ -464,6 +465,9 @@
225
 
                case 'h':
226
 
                        usage ();
227
 
                        break;
228
 
+               case 'r':
229
 
+                       rflg = 1;
230
 
+                       break;
231
 
 #ifdef USE_SHA_CRYPT
232
 
                case 's':
233
 
                        sflg = 1;