Go to main content

マニュアルページ セクション 8: システム管理コマンド

印刷ビューの終了

更新: 2022年7月27日
 
 

groupmod(8)

名前

groupmod - システム上のグループ定義の変更

形式

/usr/sbin/groupmod [-S repository] [-g gid [-o]] [-n name]
     [-U [+|-]user1[,user2]...] group

説明

groupmod コマンドは、リポジトリ内のグループデータベースの該当するエントリを変更することにより、指定されたグループの定義を変更します。

管理者は、solaris.group.assign/groupname 形式の一致する承認を保持している任意のグループを変更できます。この承認は、グループを作成した管理者に自動的に割り当てられます。ほかのすべてのグループを変更するには、管理者は solaris.group.assign 承認を保持している必要があります。

オプション

サポートしているオプションは、次のとおりです。

–g gid

グループの新しいグループ ID を指定します。このグループ ID は、<param.h> で定義された MAXUID より小さい負でない 10 進整数である必要があります。グループ ID のデフォルトは、99 より大きい次に使用可能な (一意の) 番号です。(0 から 99 のグループ ID は今後のアプリケーション用に Oracle Solaris により予約されています。)

–n name

グループの新しい名前を指定します。The name argument is a string of no more than 32 bytes consisting of characters from the set of ASCII lower case alphabetic characters and numeric characters.これらの制限が満たされていない場合は、警告メッセージが書き込まれます。Oracle Solaris の将来のリリースでは、これらの要件を満たさないグループフィールドの受け入れが拒否される可能性があります。name 引数には、少なくとも 1 文字が含まれている必要があり、コロン (:) または改行 (\n) を含めることはできません。

–o

重複した (一意でない) gid を許可します。このオプションを使用するには、管理者は solaris.group.assign 承認を保持している必要があります。

–S repository

The repository specifies which name service will be updated.有効なリポジトリは filesldap です。デフォルトのリポジトリは files です。When the repository is files, the user names can be present in other name service repositories and can be assigned to a group in the files repository.When the repository is ldap, all the assignable attributes must be present in the ldap repository, and both the LDAP server and client must be configured with enableShadowUpdate.See ldapclient(8) for details.

–U [+|-]user1[,user2]

次のようにしてグループのユーザーリストを更新します。

  • リストの前に接頭辞 + を付けた場合は、そのリストが既存のユーザーリストに追加されます。

  • リストの前に接頭辞 - を付けた場合は、そのリスト内の各ユーザーが既存のユーザーリストから削除されます。

  • リストの前に接頭辞を付けなかった場合は、既存のユーザーリストが指定された新しいユーザーリストに置き換えられます。

オペランド

次のオペランドがサポートされています。

group

変更される既存のグループ名。

終了ステータス

groupmod ユーティリティーは、終了時に次のいずれかの値を返します。

0

成功。

2

無効なコマンド構文。groupmod コマンドの使用法に関するメッセージが表示されます。

3

オプションに無効な引数が指定されました。

4

gid が一意ではありません (–o オプションを使用していない場合)。

6

group が存在しません。

9

name がグループ名としてすでに存在します。

10

/etc/group ファイルを更新できません。

ファイル

/etc/group

グループファイル

属性

属性についての詳細は、マニュアルページの attributes(7) を参照してください。

属性タイプ
属性値
使用条件
system/core-os

関連項目

group(5), attributes(7), groupadd(8), groupdel(8), logins(8), useradd(8), userdel(8), usermod(8)

The groupmod utility modifies group definitions in the group database in the repository.If a network name service is being used to supplement the local /etc/group file with additional entries, groupmod verifies the uniqueness of a specified group name and group ID against the external name service and uses the entries in the files repository.グループ名は、ポータブルファイル名文字 (A-Z、a-z、0-9、「_」、「-」、および「.」) に限定する必要があります。

グループエントリ (/etc/group 内の 1 行) が 2047 文字を超えていると、groupmod は失敗します。