NAME
groupadd - 建 立 新 群 组
总览 SYNOPSIS
groupadd [-g gid [-o]] [-r] [-f] group
描述 DESCRIPTION
groupadd 可 指 定 群 组 名 称 来 建 立 新 的 群 组 帐 号 。 需 要 时 可 从 系 统 中 取 得 新 群 组 值 。 groupadd 有 下 列 选 项 可 用 。
- -g gid
- ID 值 。 除 非 使 用 -o 参 数 不 然 该 值 必 须 是 唯 一 , 不 可 相 同 。 数 值 不 可 为 负 。 预 设 为 最 小 不 得 小 于 500 而 逐 次 增 加 。 0~499 传 统 上 是 保 留 给 系 统 帐 号 使 用 。
- -r
- 此 参 数 是 用 来 建 立 系 统 帐 号 。 它 会 自 动 帮 你 选 定 一 个 小 于 499 的 gid 除 非 命令行 再 加 上 -g 参 数 。
这 是 RED HAT 额 外 增 设 的 选 项 。 - -f
- 这是force标志。使得新 增 一 个 已 经 存 在 的 群 组 帐 号时 , 系 统 会 出 现 错 误 讯 息 然 后 结 束 groupadd 。 如 果 是 这 样 的 情 况 , 不 会 改变 这 个 群 组 ( 或 再 新 增 一 次 )
也 可 同 时 加 上 -g 选 项 当 你 加 上 一 个 gid , 此 时 gid 就 不 用 是 唯 一 值 , 可 不 加 -o 参 数 , 建 好 群 组 后 会 显 结 果.
这 是 RED HAT 额 外 增 设 的 选 项 。
文件 FILES
/etc/group - group account information
/etc/gshadow - secure group account information
参见 SEE ALSO
chfn(1), chsh(1), passwd(1), groupdel(8), groupmod(8), useradd(8), userdel(8), usermod(8)
#p#
NAME
groupadd - Create a new group
SYNOPSIS
groupadd [-g gid [-o]] [-r] [-f] group
DESCRIPTION
The groupadd command creates a new group account using the values specified on the command line and the default values from the system. The new group will be entered into the system files as needed. The options which apply to the groupadd command are
- -g gid
- The numerical value of the group's ID. This value must be unique, unless the -o option is used. The value must be non-negative. The default is to use the smallest ID value greater than 500 and greater than every other group. Values between 0 and 499 are typically reserved for system accounts.
- -r
- This flag instructs groupadd to add a system account. The first available gid lower than 499 will be automatically selected unless the -g option is also given on the command line.
This is an option added by Red Hat. - -f
- This is the force flag. This will cause groupadd to exit with an error when the group about to be added already exists on the system. If that is the case, the group won't be altered (or added again).
This option also modifies the way -g option works. When you request a gid that it is not unique and you don't specify the -o option too, the group creation will fall back to the standard behavior (adding a group as if neither -g or -o options were specified).
This is an option added by Red Hat.
FILES
/etc/group - group account information
/etc/gshadow - secure group account information
SEE ALSO
chfn(1), chsh(1), passwd(1), groupdel(8), groupmod(8), useradd(8), userdel(8), usermod(8)