groupadd/archive/2005: Difference between revisions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
m fixed capitalization of category
post-move tidying
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Linux
Shell Commands]]
[[Techniques]]: [[Linux]]: [[groupadd]]
==Text==
==Text==
===Name===
===Name===
:'''groupadd''' - Create a new group
: '''[[groupadd]]''' - Create a new group
===Synopsis===
===Synopsis===
:'''standard:''' groupadd [-g <u>gid</u> [-o]]
: '''standard:''' groupadd [-g <u>gid</u> [-o]] <u>group</u>
<u>group</u>
: '''Red Hat:''' groupadd [-g <u>gid</u> [-o]] [-r] [-f] <u>group</u>
:'''Red Hat:''' groupadd [-g <u>gid</u> [-o]] [-r] [-f]
<u>group</u>
===Description===
===Description===
:The groupadd command creates a new [[Linux:group|group]] account using
: The [[groupadd]] command creates a new [[Linux/groups|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
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
{| margin=3
{| margin=3
|-
|-
| width=10% valign=top | '''-g <u>gid</u>'''
| width=10% valign=top | '''-g <u>gid</u>'''
| The numerical value of the group's ID. This value must be unique,
| 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.
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.
|-
|-
| colspan=2 bgcolor=#eeeeee | Red Hat Linux only:
| colspan=2 bgcolor=#eeeeee | Red Hat Linux only:
|-
|-
| width=10% valign=top | '''-r'''
| width=10% valign=top | '''-r'''
| This flag instructs groupadd to add a system account. The first
| 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.
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.
|-
|-
| width=10% valign=top | '''-f'''
| width=10% valign=top | '''-f'''
| This is the force flag. This will cause groupadd to exit with an
| 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.
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===
===Files===
*'''/etc/group''' - group account information
* '''/etc/group''' - group account information
*'''/etc/gshadow''' - secure group account information
* '''/etc/gshadow''' - secure group account information
===See Also===
===See Also===
[[chfn]](1), [[chsh]](1), [[passwd]](1), [[groups]](1),
[[chfn]](1), [[chsh]](1), [[passwd]](1), [[groups]](1), [[groupdel]](8), [[groupmod]](8), [[useradd]](8), [[userdel]](8), [[usermod]](8)
[[groupdel]](8), [[groupmod]](8), [[useradd]](8), [[userdel]](8),
[[usermod]](8)
===Author===
===Author===
:Julianne Frances Haugh (jockgrrl@ix.netcom.com)
: Julianne Frances Haugh ({{email|jockgrrl|ix.netcom|com}})
==Notes==
*This command is normally not on the search path for executables, so
you may need to use [[whereis]] to find it.
*This command usually requires [[root access]].
*A '''system account''' is generally an account that isn't logged into
or used by users. Examples are audio, video, cdrom, dialout, scanner,
staff, etc. It's not clear exactly what special handling these accounts
may be receiving with Red Hat; see [[#Questions|Questions]].
==Examples== /usr/bin/groupadd newgrp
==Questions==
*What special handling do system accounts receive under Red Hat? (See
"notes" for known information about system accounts.)
*The action of the -r option ("add a system account") is a little
unclear -- does it create a system-type ''user'' account in addition to
creating a [[Linux:group|group]] account? (And if so, what is the
account's name?) Or is it merely adding a special system attribute to
the group account created? If the latter, then the purpose of such
accounts remains even less clear, as group accounts are by definition
never logged into.
==Edit Log==
==Edit Log==
*'''2005-06-09''' Transcribed from Red Hat Linux 7.1 2.96-98 Linux
*'''2005-06-09''' Transcribed from Red Hat Linux 7.1 2.96-98 Linux manpages and KUbuntu "hoary" (Debian 1:3.3.5-8ubuntu2) manpages.
manpages and KUbuntu "hoary" (Debian 1:3.3.5-8ubuntu2) manpages.

Latest revision as of 19:00, 23 April 2017

Text

Name

groupadd - Create a new group

Synopsis

standard: groupadd [-g gid [-o]] group
Red Hat: 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.
Red Hat Linux only:
-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), groups(1), groupdel(8), groupmod(8), useradd(8), userdel(8), usermod(8)

Author

Julianne Frances Haugh (jockgrrlspam@spamix.netcomspam.spamcom)

Edit Log

  • 2005-06-09 Transcribed from Red Hat Linux 7.1 2.96-98 Linux manpages and KUbuntu "hoary" (Debian 1:3.3.5-8ubuntu2) manpages.