Go to main content

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

印刷ビューの終了

更新: 2022年7月27日
 
 

roledel(8)

名前

userdel, roledel - delete a user or role login account from the system

形式

userdel [-r] [-S repository] [-q qualifier] username
userdel -S ldap [-q qualifier] default@
roledel [-r] [-S repository] [-q qualifier] rolename

説明

The userdel or roledel utility deletes a user (or role) account from the local files or specified name-service repository and optionally removes the account home directory from the file system.

–S ldap を使用して作成されるアカウントの場合、修飾されたユーザー属性または修飾なしのユーザー属性のデフォルト値は、特殊値 default@ をログイン名として使用して削除できます。

ユーザーを削除するには、管理者に User Management プロファイルが付与されている必要があります。

オプション

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

–q qualifier

削除する属性を修飾するホストまたはネットグループの名前。修飾子がネットグループ名であることを示すには、接頭辞 @ が必要です。–q オプションは、ユーザーアカウントが LDAP ネームサービスによって保持されている場合のみ有効です。修飾子に関連付けられた属性のみが削除されます。アカウントおよびその他の属性には影響がありませんが、このオプションが省略された場合はこのかぎりではありません。その場合、修飾されているすべての属性も削除されます。

–r

システムからユーザーのホームディレクトリを削除します。このディレクトリは存在する必要があります。このコマンドが正常に実行されたあと、ホームディレクトリの下にあるファイルやディレクトリにはアクセスできなくなります。ユーザーのホームディレクトリとして作成された ZFS データセットが削除されます。そのユーザー用に追加された auto_home エントリが削除されます。

–S repository

The repository specifies which name service will be updated.有効なリポジトリは filesldap です。デフォルトのリポジトリは files です。When the repository is ldap, both the LDAP server and client must be configured with enableShadowUpdate.See ldapclient(8) for details.

オペランド

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

login

削除される既存のログイン名。

終了ステータス

次の終了ステータスが返されます。

0

正常終了。

2

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

6

削除されるアカウントが存在しません。

8

削除されるアカウントが使用されています。

10

/etc/group または /etc/user_attr ファイルを更新できません。ただし、ログインは /etc/passwd ファイルから削除されます。

12

ホームディレクトリを削除できないか、またはそれ以外の変更を行うことができません。

ファイル

/etc/passwd

システムパスワードファイル

/etc/shadow

ユーザーの暗号化パスワードおよび関連情報を含むシステムファイル

/etc/group

グループ定義を含むシステムファイル

/etc/user_attr

追加のユーザー属性を含むシステムファイル

属性

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

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

関連項目

auths(1), passwd(1), profiles(1), roles(1), passwd(5), prof_attr(5), shadow(5), user_attr(5), attributes(7), rbac(7), groupadd(8), groupdel(8), groupmod(8), logins(8), roleadd(8), rolemod(8), useradd(8), usermod(8)

Managing User Accounts and User Environments in Oracle Solaris 11.4

Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP

These utilities delete an account definition that is in the group, passwd, shadow, and user_attr databases in the files or ldap repository.