当前位置: 技术问答>linux和unix
useradd -D【参数-D 是什么?】
来源: 互联网 发布时间:2017-01-10
本文导语: 参数-D 是什么? | mark学习。-D显示系统在创建用户时默认的参数。 | -D:变更预设值 | 看看man先吧。 -D, --defaults See below, the s...
参数-D 是什么?
|
mark学习。-D显示系统在创建用户时默认的参数。
|
-D:变更预设值
|
看看man先吧。
-D, --defaults
See below, the subsection "Changing the default values".
默认东西包括下内容。
Changing the default values
When invoked with only the -D option, useradd will display the current default values. When invoked with
-D plus other options, useradd will update the default values for the specified options. Valid
default-changing options are:
-b, --base-dir BASE_DIR
The path prefix for a new user´s home directory. The user´s name will be affixed to the end of
BASE_DIR to form the new user´s home directory name, if the -d option is not used when creating a new
account.
This option sets the HOME variable in /etc/default/useradd.
-e, --expiredate EXPIRE_DATE
The date on which the user account is disabled.
This option sets the EXPIRE variable in /etc/default/useradd.
-f, --inactive INACTIVE
The number of days after a password has expired before the account will be disabled.
This option sets the INACTIVE variable in /etc/default/useradd.
-g, --gid GROUP
The group name or ID for a new user´s initial group (when the -N/--no-user-group is used or when the
USERGROUPS_ENAB 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 GROUP variable in /etc/default/useradd.
-s, --shell SHELL
The name of a new user´s login shell.
This option sets the SHELL variable in /etc/default/useradd.
这个不用怎么解释吧?一看就懂的。
-D, --defaults
See below, the subsection "Changing the default values".
默认东西包括下内容。
Changing the default values
When invoked with only the -D option, useradd will display the current default values. When invoked with
-D plus other options, useradd will update the default values for the specified options. Valid
default-changing options are:
-b, --base-dir BASE_DIR
The path prefix for a new user´s home directory. The user´s name will be affixed to the end of
BASE_DIR to form the new user´s home directory name, if the -d option is not used when creating a new
account.
This option sets the HOME variable in /etc/default/useradd.
-e, --expiredate EXPIRE_DATE
The date on which the user account is disabled.
This option sets the EXPIRE variable in /etc/default/useradd.
-f, --inactive INACTIVE
The number of days after a password has expired before the account will be disabled.
This option sets the INACTIVE variable in /etc/default/useradd.
-g, --gid GROUP
The group name or ID for a new user´s initial group (when the -N/--no-user-group is used or when the
USERGROUPS_ENAB 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 GROUP variable in /etc/default/useradd.
-s, --shell SHELL
The name of a new user´s login shell.
This option sets the SHELL variable in /etc/default/useradd.
这个不用怎么解释吧?一看就懂的。