* src/useradd.c, src/groupmod.c, src/groupadd.c, src/faillog.c:

Fix typos. Take this opportunity to split the usage messages into
	smaller messages (one per option).
	* src/pwck.c: Fix typo.
This commit is contained in:
nekral-guest 2009-06-05 22:16:56 +00:00
parent 35c0b2cb47
commit d6f18c207e
6 changed files with 84 additions and 77 deletions

View File

@ -1,3 +1,10 @@
2009-06-06 Nicolas François <nicolas.francois@centraliens.net>
* src/useradd.c, src/groupmod.c, src/groupadd.c, src/faillog.c:
Fix typos. Take this opportunity to split the usage messages into
smaller messages (one per option).
* src/pwck.c: Fix typo.
2009-06-05 Petri Koistinen <petri.koistinen@iki.fi>
* man/passwd.1.xml: The short option for --mindays is -n, not -m.

View File

@ -71,19 +71,21 @@ static struct stat statbuf; /* fstat buffer for file size */
static void usage (void)
{
fputs (_("Usage: faillog [options]\n"
"\n"
"Options:\n"
" -a, --all display faillog records for all users\n"
" -h, --help display this help message and exit\n"
" -l, --lock-time SEC after failed login lock account to SEC seconds\n"
" -m, --maximum MAX set maximum failed login counters to MAX\n"
" -r, --reset reset the counters of login failures\n"
" -t, --time DAYS display faillog records more recent than DAYS\n"
" -u, --user LOGIN display faillog record or maintains failure\n"
" counters and limits (if used with -r, -m or -l\n"
" options) only for user with LOGIN\n"
"\n"), stderr);
(void) fprintf (stderr,
_("Usage: %s [options]\n"
"\n"
"Options:\n"),
"faillog");
(void) fputs (_(" -a, --all display faillog records for all users\n"), stderr);
(void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
(void) fputs (_(" -l, --lock-time SEC after failed login lock account for SEC seconds\n"), stderr);
(void) fputs (_(" -m, --maximum MAX set maximum failed login counters to MAX\n"), stderr);
(void) fputs (_(" -r, --reset reset the counters of login failures\n"), stderr);
(void) fputs (_(" -t, --time DAYS display faillog records more recent than DAYS\n"), stderr);
(void) fputs (_(" -u, --user LOGIN/RANGE display faillog record or maintains failure\n"
" counters and limits (if used with -r, -m,\n"
" or -l) only for the specified LOGIN(s)\n"), stderr);
(void) fputs ("\n", stderr);
exit (E_USAGE);
}

View File

@ -107,19 +107,21 @@ static void check_perms (void);
*/
static void usage (void)
{
fputs (_("Usage: groupadd [options] GROUP\n"
"\n"
"Options:\n"
" -f, --force force exit with success status if the\n"
" specified group already exists\n"
" -g, --gid GID use GID for the new group\n"
" -h, --help display this help message and exit\n"
" -K, --key KEY=VALUE overrides /etc/login.defs defaults\n"
" -o, --non-unique allow create group with duplicate\n"
" (non-unique) GID\n"
" -p, --password PASSWORD use encrypted password for the new group\n"
" -r, --system create a system account\n"
"\n"), stderr);
(void) fprintf (stderr,
_("Usage: %s [options] GROUP\n"
"\n"
"Options:\n"),
Prog);
(void) fputs (_(" -f, --force exit successfully if the group already exists,\n"
" and cancel -g if the GID is already used\n"), stderr);
(void) fputs (_(" -g, --gid GID use GID for the new group\n"), stderr);
(void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
(void) fputs (_(" -K, --key KEY=VALUE override /etc/login.defs defaults\n"), stderr);
(void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n"
" (non-unique) GID\n"), stderr);
(void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), stderr);
(void) fputs (_(" -r, --system create a system account\n"), stderr);
(void) fputs ("\n", stderr);
exit (E_USAGE);
}

View File

@ -115,15 +115,18 @@ static void update_primary_groups (gid_t ogid, gid_t ngid);
static void usage (void)
{
fputs (_("Usage: groupmod [options] GROUP\n"
"\n"
"Options:\n"
" -g, --gid GID force use new GID by GROUP\n"
" -h, --help display this help message and exit\n"
" -n, --new-name NEW_GROUP force use NEW_GROUP name by GROUP\n"
" -o, --non-unique allow using duplicate (non-unique) GID by GROUP\n"
" -p, --password PASSWORD use encrypted password for the new password\n"
"\n"), stderr);
(void) fprintf (stderr,
_("Usage: %s [options] GROUP\n"
"\n"
"Options:\n"),
Prog);
(void) fputs (_(" -g, --gid GID change the group ID to GID\n"), stderr);
(void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
(void) fputs (_(" -n, --new-name NEW_GROUP change the name to NEW_GROUP\n"), stderr);
(void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), stderr);
(void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n"
" PASSWORD\n"), stderr);
(void) fputs ("\n", stderr);
exit (E_USAGE);
}

View File

@ -154,7 +154,7 @@ static void process_flags (int argc, char **argv)
}
if (sort_mode && read_only) {
fprintf (stderr, _("%s: -s and -r are incompatibile\n"), Prog);
fprintf (stderr, _("%s: -s and -r are incompatible\n"), Prog);
exit (E_USAGE);
}

View File

@ -683,49 +683,42 @@ static int get_groups (char *list)
*/
static void usage (void)
{
fprintf (stderr,
_("Usage: useradd [options] LOGIN\n"
"\n"
"Options:\n"
" -b, --base-dir BASE_DIR base directory for the new user account\n"
" home directory\n"
" -c, --comment COMMENT set the GECOS field for the new user account\n"
" -d, --home-dir HOME_DIR home directory for the new user account\n"
" -D, --defaults print or save modified default useradd\n"
" configuration\n"
" -e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE\n"
" -f, --inactive INACTIVE set password inactive after expiration\n"
" to INACTIVE\n"
" -g, --gid GROUP force use GROUP for the new user account\n"
" -G, --groups GROUPS list of supplementary groups for the new\n"
" user account\n"
" -h, --help display this help message and exit\n"
" -k, --skel SKEL_DIR specify an alternative skel directory\n"
" -K, --key KEY=VALUE overrides /etc/login.defs defaults\n"
" -l, --no-log-init do not add the user to the lastlog and\n"
" faillog databases\n"
" -m, --create-home create home directory for the new user\n"
" account\n"
" -M, --no-create-home do not create user's home directory\n"
" (overrides /etc/login.defs)\n"
" -N, --no-user-group do not create a group with the same name as\n"
" the user\n"
" -o, --non-unique allow create user with duplicate\n"
" (non-unique) UID\n"
" -p, --password PASSWORD use encrypted password for the new user\n"
" account\n"
" -r, --system create a system account\n"
" -s, --shell SHELL the login shell for the new user account\n"
" -u, --uid UID force use the UID for the new user account\n"
" -U, --user-group create a group with the same name as the user\n"
"%s"
"\n"),
(void) fprintf (stderr,
_("Usage: useradd [options] LOGIN\n"
"\n"
"Options:\n"),
Prog);
(void) fputs (_(" -b, --base-dir BASE_DIR base directory for the home directory of the\n"
" new account\n"), stderr);
(void) fputs (_(" -c, --comment COMMENT GECOS field of the new account\n"), stderr);
(void) fputs (_(" -d, --home-dir HOME_DIR home directory of the new account\n"), stderr);
(void) fputs (_(" -D, --defaults print or change default useradd configuration\n"), stderr);
(void) fputs (_(" -e, --expiredate EXPIRE_DATE expiration date of the new account\n"), stderr);
(void) fputs (_(" -f, --inactive INACTIVE password inactivity period of the new account\n"), stderr);
(void) fputs (_(" -g, --gid GROUP name or ID of the primary group of the new\n"
" account\n"), stderr);
(void) fputs (_(" -G, --groups GROUPS list of supplementary groups of the new\n"
" account\n"), stderr);
(void) fputs (_(" -h, --help display this help message and exit\n"), stderr);
(void) fputs (_(" -k, --skel SKEL_DIR use this alternative skeleton directory\n"), stderr);
(void) fputs (_(" -K, --key KEY=VALUE override /etc/login.defs defaults\n"), stderr);
(void) fputs (_(" -l, --no-log-init do not add the user to the lastlog and\n"
" faillog databases\n"), stderr);
(void) fputs (_(" -m, --create-home create the user's home directory\n"), stderr);
(void) fputs (_(" -M, --no-create-home do not create the user's home directory\n"), stderr);
(void) fputs (_(" -N, --no-user-group do not create a group with the same name as\n"
" the user\n"), stderr);
(void) fputs (_(" -o, --non-unique allow to create users with duplicate\n"
" (non-unique) UID\n"), stderr);
(void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), stderr);
(void) fputs (_(" -r, --system create a system account\n"), stderr);
(void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), stderr);
(void) fputs (_(" -u, --uid UID user ID of the new account\n"), stderr);
(void) fputs (_(" -U, --user-group create a group with the same name as the user\n"), stderr);
#ifdef WITH_SELINUX
_(" -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping\n")
#else
""
(void) fputs (_(" -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping\n"), stderr);
#endif
);
(void) fputs ("\n", stderr);
exit (E_USAGE);
}