useradd -D【参数-D 是什么?】

L3nnon 2011-10-26 09:13:27
参数-D 是什么?
...全文
329 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhangyisc 2011-10-27
  • 打赏
  • 举报
回复
mark学习。-D显示系统在创建用户时默认的参数。
Linux-Torvalds 2011-10-26
  • 打赏
  • 举报
回复
看看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.
这个不用怎么解释吧?一看就懂的。
影月之伤 2011-10-26
  • 打赏
  • 举报
回复
-D:变更预设值

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧