useradd: Improve usage text
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008, Ingo Weinhold, [email protected]. All Rights Reserved.
|
* Copyright 2008-2013, Ingo Weinhold, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -30,8 +30,26 @@ extern const char *__progname;
|
|||||||
|
|
||||||
|
|
||||||
static const char* kUsage =
|
static const char* kUsage =
|
||||||
"Usage: %s [ -d <home> ] [ -e <expiration> ] [ -f <inactive> ] [ -g <gid> ]\n"
|
"Usage: %s [ <options> ] <user name>\n"
|
||||||
" [ -s <shell> ] [ -n <real name> ]\n"
|
"Creates a new user <user name>.\n"
|
||||||
|
"\n"
|
||||||
|
"Options:\n"
|
||||||
|
" -d <home>\n"
|
||||||
|
" Specifies the home directory for the new user.\n"
|
||||||
|
" -e <expiration>\n"
|
||||||
|
" Specifies the expiration date for the new user's account.\n"
|
||||||
|
" -f <inactive>\n"
|
||||||
|
" Specifies the number of days after the expiration of the new user's "
|
||||||
|
"password\n"
|
||||||
|
" until the account expires.\n"
|
||||||
|
" -g <gid>\n"
|
||||||
|
" Specifies the new user's primary group by ID or name.\n"
|
||||||
|
" -h, --help\n"
|
||||||
|
" Print usage info.\n"
|
||||||
|
" -s <shell>\n"
|
||||||
|
" Specifies the new user's login shell.\n"
|
||||||
|
" -n <real name>\n"
|
||||||
|
" Specifies the new user's real name.\n"
|
||||||
;
|
;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -84,6 +102,7 @@ main(int argc, const char* const* argv)
|
|||||||
|
|
||||||
case 'g':
|
case 'g':
|
||||||
gid = atoi(optarg);
|
gid = atoi(optarg);
|
||||||
|
// TODO: Support name!
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'h':
|
case 'h':
|
||||||
|
|||||||
Reference in New Issue
Block a user