目的
ユーザーまたはグループのメンバーシップ・リストを表示します。
構文
pts membership -nameorid <user or group name or id>+ [-cell <cell name>] [-noauth] [-force] [-help] pts m -na <user or group name or id>+ [-c <cell name>] [-no] [-f] [-h] pts groups -na <user or group name or id>+ [-c <cell name>] [-no] [-f] [-h] pts g -na <user or group name or id>+ [-c <cell name>] [-no] [-f] [-h]
構文
pts membership コマンドは、 -nameorid 引き数に指定された、ユーザーまたはマシンが属するグループをリスト表示します。あるいは、 -nameorid 引き数に指定された、各グループに属するユーザーまたはマシンをリスト表示します。
system:anyuser のメンバーまたは、 system:authuser グループを、リスト表示することはできません。またこれらは、ユーザーが属するグループのリストには表示されません。
ユーザーまたはマシンをグループに追加するには、 pts adduser コマンドを使用してください。それらを削除する場合は、 pts removeuser コマンドを使用してください。
オプション
出力
ユーザーおよびマシンごとに、出力は次のようなヘッダー行で始まり、ユーザーやマシンが属するグループのリストがそれに続きます。
Groups name (id: AFS UID) is a member of:
グループごとに、出力は次のようなヘッダー行で始まり、グループに属するユーザーやマシンのリストがそれに続きます。
Members of group_name (id: AFS GID) are:
例
次の例では、ユーザー pat が属するグループと、グループ smith:friends のメンバーをリスト表示しています。項目 pat の 3 番目の privacy フラグは、デフォルトのハイフンが変更され、非管理ユーザーがこのリストを取得できるようになっているので注意してください。
% pts membership pat smith:friends Groups pat (id: 1144) is a member of: smith:friends staff johnson:project-team Members of smith:friends (id: -562) are: pat terry jones richard thompson
必要となる特権
-nameorid 引き数に指定された、各ユーザーまたはグループの保護データベース項目の、 3 番目の privacy フラグの設定によって、必要な特権が異なります (このフラグを表示するには、 pts examine コマンドを使用します)。
関連情報