admgroupmod(1M)

NAME
admgroupmod - modifies an existing group entry

SYNOPSIS

admgroupmod [ -g gid] [-n name]
[-x members=member1[,member2...]]
[-x ns=NIS+|NIS|NONE]
[-x domain=domain|rhost=host]
[-x passwd=password]
[group]

DESCRIPTION
The Solstice admgroupmod command modifies an existing entry in the group database. The group must be specified by using either the group ID or group name. If the group name is specified, the -g parameter may be used to change the group ID.

AVAILABILITY

SUNWsadmb package.

OPTIONS

-g gid
    The existing group ID for the group or a new group ID if the group name is used to specify the group to be modified. If you are changing the group ID, use a non-negative decimal integer below MAXUID as defined in the <sys/param.h> file (60002). Group IDs 0-99 are reserved for the system and should be used with care.

-n name
    The new name for the group. The name can contain lowercase letters and numbers. It cannot contain a colon (:) or a newline (\n).

-x  Indicates that extended, nonstandard options follow.

    members=member1[,member2...]
        The new members to be added in the group.

    ns=NIS+|NIS|NONE
        Sets name service. The default is to use the name service configured on the host on which the command is run. The precedence is NIS+, NIS, then NONE.
        NIS+
            Updates the NIS+ group table for the current domain.

        NIS
            Updates the NIS group table for the current domain.

        NONE
            Updates the local /etc/group file.

    domain=domain|rhost=host
        Specifies domain or remote host. The domain can be specified when the value for the ns parameter is NIS+ or NIS. The domain defaults to the current systems domain. The rhost can be specified when the value for the ns parameter is NONE. The rhost defaults to the current system. The rhost parameter can be used to perform the operation on the specified host. The machine specified as an argument to rhost must be running AdminSuite 2.1 or later for the command to complete successfully.

    passwd=password
        Specifies the group password that is set when the group is modified. The group password gives your group files added security so that anyone outside of your group can not read your files without entering the group password.

group
    The current name of the group to be modified.

ENVIRONMENT

See environ(5) for descriptions of the following environment variables that affect the execution of admgroupmod: LANG, LC_ALL, LC_CTYPE, and LC_MESSAGES.

ERRORS

The admgroupmod command exits with one of the following values:

0   Success.

1   Invalid command syntax. A usage message for the admgroupmod command is displayed.

2   An error occurred while executing the command. An exception code and error message are displayed.

RESTRICTIONS
You must be a member of UNIX group 14, the sysadmin group, to execute this command. Also, if the name service is NIS+, you must be a member of the NIS+ admin group (See nisgrpadm(1)). Interrupt signal handling is disabled while modifying the group to insure that the system is in a consistent state.

EXAMPLES
The following command changes the group name for existing group 301. admgroupmod -g 301 -n new_name -x ns=NIS

FILES
/etc/group

SEE ALSO
admgroupadd(1M), admgroupdel(1M), admgroupls(1M)