admgroup(1M) DG/UX R4.11MU05 admgroup(1M)
NAME
admgroup - manage group information in the group database
SYNOPSIS
admgroup -o add [ -y ] [ -g gid ] [ -m member-list ] group
admgroup -o modify [ -y ] [ -g gid ] [ -n new-group ] [ -m member-
list ] [ -r member-list ] [ -a member-list ] group
admgroup -o delete [ -y ] group ...
admgroup -o list [ -qv ] [ -y ] [ group ... ]
DESCRIPTION
admgroup manages the user and group information in the group(4)
database file. The group file contains a group name that associates
a numerical group id with one or more users who have access to group
information.
admgroup is normally run by the system administrator on the NIS (YP)
master machine if the system is running NIS, or on any host if the
system is not running NIS.
Operations
add Add a new group to the group file. If the specified group
already exists, the operation will not be successful.
modify Modify currently existing information in the local or NIS
group database. The command-line options will determine
the changes that are made to the group entry in the group
database.
delete Delete the given group(s) from the group database.
list List the group(s) in the group database which match the
specified command-line options. If no command-line options
are given, then only the local group database will be
listed. Any user may execute this operation.
Options
-y Perform the requested operation on the global NIS database.
Without this option, the requested operation is performed
on the local database in the /etc directory. This option
is valid only when the machine on which the command is run
is the NIS master. The -y option uses the default source
directory derived from the SRC_DIR variable specified in
the NIS makefile (/etc/yp/Makefile).
-g gid The new group ID for the group should be gid. It must be a
non-negative integer less than or equal to MAXUID , as
defined in <sys/param.h>. It defaults to an available
unique group ID above 99.
-n new-group
Specifies a string of printable characters that is the new
group name for the group. It may not contain a colon (:)
or newline and must be a unique group name.
-m member-list
Specifies the login names of users who are to be members of
the group. This list must be a quoted space or comma-
separated list of names (see example). The names must be
valid user names in the passwd database. If this option is
not specified for the add operation, then the group will
have no members.
-a member-list
Specifies the login users who are to be added to the list
of members in the group. This list must be a quoted space
or comma-separated list of names (see example). The names
must be valid user names in the passwd database.
-r member-list
Specifies the login users who are to be removed from the
list of members in the group. This list must be a quoted
space or comma-separated list of names (see example). The
names must be valid user names in the passwd database.
-q Quiet. The headers are not printed when listing group
information.
-v Verbose. The headers are printed when listing group
information. This option is enabled by default.
EXAMPLES
admgroup -o add -g 101 -m "sjones esmith" sysadmin
admgroup -o modify -a connor,wamo sysadmin
DIAGNOSTICS
Warnings
- Only one member modification option may be specified. Other
options will be ignored.
Errors
- The add, delete, or modify operation was unable to update the
group database.
- The modify operation could not find the specified group.
Exit Codes
This section lists the possible exit codes and what they mean.
0 The operation was successful.
1 The operation was unsuccessful.
2 The operation failed due to access restrictions.
3 There was an error in the command line.
NOTES
You must have appropriate privilege to perform all operations except
list. For systems supporting the DG/UX Capability Option,
appropriate privilege is defined as having one or more specific
capabilities enabled in the effective capability set of the user.
See capdefaults(5) for the default capabilities for this command.
On systems without the DG/UX Capability Option, appropriate privilege
means that your process has an effective UID of root. See the
appropriateprivilege(5) man page for more information.
FILES
/etc/group
Local group database file.
SEE ALSO
groups(1), groupadd(1M), groupdel(1M), groupmod(1M), sysadm(1M),
group(4). appropriateprivilege(5), capdefaults(5).
Licensed material--property of copyright holder(s)