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 オプションは、ユーザーアカウントが LDAP ネームサービスによって保持されている場合のみ有効です。修飾子に関連付けられた属性のみが削除されます。アカウントおよびその他の属性には影響がありませんが、このオプションが省略された場合はこのかぎりではありません。その場合、修飾されているすべての属性も削除されます。
システムからユーザーのホームディレクトリを削除します。このディレクトリは存在する必要があります。このコマンドが正常に実行されたあと、ホームディレクトリの下にあるファイルやディレクトリにはアクセスできなくなります。ユーザーのホームディレクトリとして作成された ZFS データセットが削除されます。そのユーザー用に追加された auto_home エントリが削除されます。
The repository specifies which name service will be updated.有効なリポジトリは files と ldap です。デフォルトのリポジトリは files です。When the repository is ldap, both the LDAP server and client must be configured with enableShadowUpdate.See ldapclient(8) for details.
次のオペランドがサポートされています。
削除される既存のログイン名。
次の終了ステータスが返されます。
正常終了。
無効なコマンド構文。userdel コマンドの使用法に関するメッセージが表示されます。
削除されるアカウントが存在しません。
削除されるアカウントが使用されています。
/etc/group または /etc/user_attr ファイルを更新できません。ただし、ログインは /etc/passwd ファイルから削除されます。
ホームディレクトリを削除できないか、またはそれ以外の変更を行うことができません。
システムパスワードファイル
ユーザーの暗号化パスワードおよび関連情報を含むシステムファイル
グループ定義を含むシステムファイル
追加のユーザー属性を含むシステムファイル
属性についての詳細は、マニュアルページの attributes(7) を参照してください。
|
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.