'\" te .\" Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. .\" Copyright 1989 AT&T .TH groupmod 1M "23 Apr 2011" "SunOS 5.11" "System Administration Commands" .SH NAME groupmod \- modify a group definition on the system .SH SYNOPSIS .LP .nf \fB/usr/sbin/groupmod\fR [\fB-S\fR \fIrepository\fR] [\fB-g\fR \fIgid\fR [\fB-o\fR]] [\fB-n\fR \fIname\fR] [\fB-U\fR [+|-]\fIuser1\fR[,\fIuser2\fR]...] \fIgroup\fR .fi .SH DESCRIPTION .sp .LP The \fBgroupmod\fR command modifies the definition of the specified group by modifying the appropriate entry in the group database in the repository. .sp .LP An administrator can modify any group for which it has a matching authorization of the form \fBsolaris.group.assign\fR/\fIgroupname\fR. This authorization is automatically assigned to the administrator who created the group. An administrator must have \fBsolaris.group.assign\fR authorization to modify all other groups. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-g\fR \fIgid\fR\fR .ad .sp .6 .RS 4n Specify the new group \fBID\fR for the group. This group \fBID\fR must be a non-negative decimal integer less than \fBMAXUID\fR, as defined in \fB\fR\&. The group \fBID\fR defaults to the next available (unique) number above 99. (Group IDs from 0-99 are reserved by SunOS for future applications.) .RE .sp .ne 2 .mk .na \fB\fB-n\fR \fIname\fR\fR .ad .sp .6 .RS 4n Specify the new name for the group. The \fIname\fR argument is a string of no more than eight bytes consisting of characters from the set of lower case alphabetic characters and numeric characters. A warning message will be written if these restrictions are not met. A future Solaris release may refuse to accept group fields that do not meet these requirements. The \fIname\fR argument must contain at least one character and must not include a colon (\fB:\fR) or \fBNEWLINE\fR (\fB\en\fR). .RE .sp .ne 2 .mk .na \fB\fB-o\fR\fR .ad .sp .6 .RS 4n Allow the \fIgid\fR to be duplicated (non-unique). An administrator must have solaris.group.assign authorization to use this option. .RE .sp .ne 2 .mk .na \fB\fB-S\fR \fIrepository\fR\fR .ad .sp .6 .RS 4n The valid repositories are \fBfiles\fR and \fBldap\fR. The repository specifies which name service will be updated. When \fIrepository\fR is not specified, \fBgroupmod\fR consults \fBnsswitch.conf\fR(4). When the repository is \fBfiles\fR, the user name and other items can be present in other name service repositories and can be assigned to a group in the \fBfiles\fR repository. When the repository is \fBldap\fR, all the assignable attributes must be present in the \fBldap\fR repository. .RE .sp .ne 2 .mk .na \fB\fB-U\fR [+|-]\fIuser1\fR[,\fIuser2\fR]\fR .ad .sp .6 .RS 4n Updates the list of users for the group as follows: .RS +4 .TP .ie t \(bu .el o A prefix \fB+\fR before the list adds that list to existing users list. .RE .RS +4 .TP .ie t \(bu .el o A prefix \fB-\fR before the list removes each user in the list from the existing users list. .RE .RS +4 .TP .ie t \(bu .el o With no prefix before the list, replaces the existing users list with the new list of users specified. .RE .RE .SH OPERANDS .sp .LP The following operands are supported: .sp .ne 2 .mk .na \fB\fIgroup\fR\fR .ad .RS 9n .rt An existing group name to be modified. .RE .SH EXIT STATUS .sp .LP The \fBgroupmod\fR utility exits with one of the following values: .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .RS 6n .rt Success. .RE .sp .ne 2 .mk .na \fB\fB2\fR\fR .ad .RS 6n .rt Invalid command syntax. A usage message for the \fBgroupmod\fR command is displayed. .RE .sp .ne 2 .mk .na \fB\fB3\fR\fR .ad .RS 6n .rt An invalid argument was provided to an option. .RE .sp .ne 2 .mk .na \fB\fB4\fR\fR .ad .RS 6n .rt \fIgid\fR is not unique (when the \fB-o\fR option is not used). .RE .sp .ne 2 .mk .na \fB\fB6\fR\fR .ad .RS 6n .rt \fIgroup\fR does not exist. .RE .sp .ne 2 .mk .na \fB\fB9\fR\fR .ad .RS 6n .rt \fIname\fR already exists as a group name. .RE .sp .ne 2 .mk .na \fB\fB10\fR\fR .ad .RS 6n .rt Cannot update the \fB/etc/group\fR file. .RE .SH FILES .sp .ne 2 .mk .na \fB\fB/etc/group\fR\fR .ad .RS 14n .rt group file .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/core-os .TE .SH SEE ALSO .sp .LP \fBusers\fR(1B), \fBgroupadd\fR(1M), \fBgroupdel\fR(1M), \fBlogins\fR(1M), \fBuseradd\fR(1M), \fBuserdel\fR(1M), \fBusermod\fR(1M), \fBgroup\fR(4), \fBnsswitch.conf\fR(4), \fBattributes\fR(5) .SH NOTES .sp .LP The \fBgroupmod\fR utility only modifies group definitions in the group database in the repository. If a network name service such as \fBNIS\fR is being used to supplement the local \fB/etc/group\fR file with additional entries, \fBgroupmod\fR cannot change information supplied by the network name service. \fBgroupmod\fR verifies the uniqueness of group name and group ID against the external name service and uses the entries in the \fBfiles\fR repository. .sp .LP \fBgroupmod\fR fails if a group entry (a single line in \fB/etc/group\fR) exceeds 2047 characters.