view usr/src/man/man1m/groupmod.1m @ 13659:57451298f940

1469 ttyc/ttyd should be an allowed console device Reviewed by: Milan Jurik <milan.jurik@xylab.cz> Reviewed by: Alexander Eremin <alexander.r.eremin@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>
author Gary Mills <gary_mills@fastmail.fm>
date Thu, 05 Apr 2012 08:47:21 -0500
parents 5b2854ecc12d
children
line wrap: on
line source

'\" te
.\"  Copyright 1989 AT&T  Copyright (c) 1997, Sun Microsystems, Inc.  All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH GROUPMOD 1M "Aug 27, 2008"
.SH NAME
groupmod \- modify a group definition on the system
.SH SYNOPSIS
.LP
.nf
\fB/usr/sbin/groupmod\fR [\fB-g\fR \fIgid\fR [\fB-o\fR]] [\fB-n\fR \fIname\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 \fB/etc/group\fR file.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-g\fR \fIgid\fR\fR
.ad
.RS 11n
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<param.h>\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
.na
\fB\fB-n\fR \fIname\fR\fR
.ad
.RS 11n
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
.na
\fB\fB-o\fR\fR
.ad
.RS 11n
Allow the \fIgid\fR to be duplicated (non-unique).
.RE

.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIgroup\fR\fR
.ad
.RS 9n
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
.na
\fB\fB0\fR\fR
.ad
.RS 6n
Success.
.RE

.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 6n
Invalid command syntax. A usage message for the \fBgroupmod\fR command is
displayed.
.RE

.sp
.ne 2
.na
\fB\fB3\fR\fR
.ad
.RS 6n
An invalid argument was provided to an option.
.RE

.sp
.ne 2
.na
\fB\fB4\fR\fR
.ad
.RS 6n
\fIgid\fR is not unique (when the \fB-o\fR option is not used).
.RE

.sp
.ne 2
.na
\fB\fB6\fR\fR
.ad
.RS 6n
\fIgroup\fR does not exist.
.RE

.sp
.ne 2
.na
\fB\fB9\fR\fR
.ad
.RS 6n
\fIname\fR already exists as a group name.
.RE

.sp
.ne 2
.na
\fB\fB10\fR\fR
.ad
.RS 6n
Cannot update the \fB/etc/group\fR file.
.RE

.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/group\fR\fR
.ad
.RS 14n
group file
.RE

.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),
\fBattributes\fR(5)
.SH NOTES
.sp
.LP
The \fBgroupmod\fR utility only modifies group definitions in the
\fB/etc/group\fR file. If a network name service such as \fBNIS\fR or
\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. The \fBgroupmod\fR utility will, however, verify the
uniqueness of group name and group \fBID\fR against the external name service.
.sp
.LP
\fBgroupmod\fR fails if a group entry (a single line in \fB/etc/group\fR)
exceeds 2047 characters.