From f74d7a9fd0a1ba92963ea4ccd275e352f64a6e87 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Sun, 31 Aug 2008 17:31:00 +0000 Subject: [PATCH] * man/useradd.8.xml: Document the /etc/default/useradd variables. * man/useradd.8.xml: Fix the documentation of the GROUP variable (and -g/--gid option). --- ChangeLog | 6 ++++ TODO | 4 --- man/useradd.8.xml | 84 ++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 79 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4656ae0e..a9f4c51f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-30 Nicolas François + + * man/useradd.8.xml: Document the /etc/default/useradd variables. + * man/useradd.8.xml: Fix the documentation of the GROUP variable + (and -g/--gid option). + 2008-08-29 Nicolas François * shadow.spec.in: Fix the source (new FTP). diff --git a/TODO b/TODO index d6c11365..098d463b 100644 --- a/TODO +++ b/TODO @@ -23,10 +23,6 @@ WITH_SELINUX chage, chfn, chsh: same change needed as in passwd. - probably need moving check_selinux_access to a separate file. -man useradd - document default behavior for GROUP - remove "The default group number is 1 or whatever is..." - useradd manpage - add -k option - mention that -o require -u diff --git a/man/useradd.8.xml b/man/useradd.8.xml index 6c330ca4..81253fc8 100644 --- a/man/useradd.8.xml +++ b/man/useradd.8.xml @@ -77,6 +77,13 @@ If the option is not used, BASE_DIR must exist. + + If this option is not specified, useradd + will use the base directory specified by the + variable in + /etc/default/useradd, or + /home by default. + @@ -129,6 +136,12 @@ The date on which the user account will be disabled. The date is specified in the format YYYY-MM-DD. + + If not specified, useradd will use the + default expiry date specified by the + variable in /etc/default/useradd, or + an empty string (no expiry) by default. + @@ -141,7 +154,13 @@ The number of days after a password expires until the account is permanently disabled. A value of 0 disables the account as soon as the password has expired, and a value of -1 disables the - feature. The default value is -1. + feature. + + + If not specified, useradd will use the + default inactivity period specified by the + variable in the + /etc/default/useradd, or -1 by default. @@ -154,8 +173,22 @@ The group name or number of the user's initial login group. The group name must exist. A group number must refer to an already - existing group. The default group number is 1 or whatever is - specified in /etc/default/useradd. + existing group. + + + If not specified, the bahavior of useradd + will depend on the variable + in /etc/login.defs. If this variable is + set to yes (or + is specified on the command + line), a group will be created for the user, with the same + name as her loginname. If the variable is set to + no (or + is specified on the + command line), useradd will set the primary group of the new + user to the value specified by the + variable in /etc/default/useradd, or + 100 by default. @@ -198,7 +231,8 @@ If this option is not set, the skeleton directory is defined - in /etc/default/useradd or, by default, + by the variable in + /etc/default/useradd or, by default, /etc/skel. @@ -210,7 +244,7 @@ - Overrides /etc/login.defs defaults (UID_MIN, UID_MAX, UMASK, + Overrides /etc/login.defs defaults (UID_MIN, UID_MAX, UMASK, PASS_MAX_DAYS and others). @@ -274,7 +308,7 @@ The default behavior (if the , , and options are not specified) is defined by the - variable in login.defs. + variable in /etc/login.defs. @@ -312,7 +346,7 @@ /etc/shadow, and their numeric identifiers are choosen in the - - range, defined in login.defs, instead of + range, defined in /etc/login.defs, instead of - (and their counterparts for the creation of groups). @@ -327,7 +361,9 @@ The name of the user's login shell. The default is to leave this field blank, which causes the system to select the default login - shell. + shell specified by the variable in + /etc/default/useradd, or an empty string + by default. @@ -359,7 +395,7 @@ The default behavior (if the , , and options are not specified) is defined by the - variable in login.defs. + variable in /etc/login.defs. @@ -388,6 +424,10 @@ home directory name, if the option is not used when creating a new account. + + This option sets the variable in + /etc/default/useradd. + @@ -397,6 +437,10 @@ The date on which the user account is disabled. + + This option sets the variable in + /etc/default/useradd. + @@ -409,6 +453,10 @@ The number of days after a password has expired before the account will be disabled. + + This option sets the variable in + /etc/default/useradd. + @@ -418,10 +466,18 @@ - The group name or ID for a new user's initial group. The named + The group name or ID for a new user's initial group (when + the is used or when the + variable is set to + no in + /etc/login.defs. The named group must exist, and a numerical group ID must have an existing entry. + + This option sets the variable in + /etc/default/useradd. + @@ -433,6 +489,10 @@ The name of a new user's login shell. + + This option sets the variable in + /etc/default/useradd. + @@ -443,7 +503,9 @@ NOTES The system administrator is responsible for placing the default - user files in the /etc/skel/ directory. + user files in the /etc/skel/ directory (or any + other skeleton directory specified in + /etc/default/useradd or on the command line).