20.16. ユーザーおよびロールの手動による非アクティブ化


1 つのユーザーアカウントまたはアカウントのセットを一時的に非アクティブにできます。アカウントが非アクティブになると、ユーザーがディレクトリーにバインドできません。認証操作は失敗します。
ユーザーおよびロールは、動作している属性 nsAccountLock を使用して非アクティベートされます。エントリーに値が truensAccountLock 属性が含まれる場合、サーバーはバインドを拒否します。
同じ手順を使用して、ユーザーとロールを非アクティブ化します。ただし、ロールが非アクティブになると、ロールエントリー自体ではなく ロールのメンバー が非アクティブになります。一般的なロールの詳細、およびロールとアクセスコントロールの関係については、8章エントリーの編成とグループ化を参照してください。
警告
データベースのルートエントリー (ルートまたは部分接尾辞に対応するエントリー) は非アクティブにできません。3章ディレクトリーエントリーの管理には、root またはサブ接尾辞のエントリーの作成に関する情報があり、2章ディレクトリーデータベースの設定には、root およびサブ接尾辞の作成に関する情報があります。

20.16.1. アカウントまたはロールのステータスの表示

以下のステータスを表示するには、次を実行します。
  • アカウントで、次を入力します。
    Copy to Clipboard Toggle word wrap
    # dsidm -D "cn=Directory Manager" ldap://server.example.com -b "dc=example,dc=com" account entry-status "uid=user_name,ou=People,dc=example,dc=com"
    Entry DN: uid=user_name,ou=People,dc=example,dc=com
    Entry Creation Date: 20200813085535Z (2020-08-13 08:55:35)
    Entry Modification Date: 20200813085535Z (2020-08-13 08:55:35)
    Entry State: activated
    オプション: -V オプションをコマンドに渡して、追加情報を表示します。
    Copy to Clipboard Toggle word wrap
    # dsidm -D "cn=Directory Manager" ldap://server.example.com -b "dc=example,dc=com" account entry-status "uid=user_name,ou=People,dc=example,dc=com" -V
    Entry DN: uid=user_name,ou=People,dc=example,dc=com
    Entry Creation Date: 20200824160645Z (2020-08-24 16:06:45)
    Entry Modification Date: 20200824160645Z (2020-08-24 16:06:45)
    Entry Last Login Date: 20200824160645Z (2020-08-24 16:06:45)
    Entry Time Until Inactive: 2 seconds (2020-08-24 16:07:45)
    Entry State: activated
    上記の出力は、出力の最後の 2 行で表されるアクティブなアカウントの例です。非アクティブなアカウントは、以下のような出力を提供します。
    Copy to Clipboard Toggle word wrap
    # dsidm -D "cn=Directory Manager" ldap://server.example.com -b "dc=example,dc=com" account entry-status "uid=user_name,ou=People,dc=example,dc=com" -V
    Entry DN: uid=user_name,ou=People,dc=example,dc=com
    Entry Creation Date: 20200824160645Z (2020-08-24 16:06:45)
    Entry Modification Date: 20200824160645Z (2020-08-24 16:06:45)
    Entry Last Login Date: 20200824160645Z (2020-08-24 16:06:45)
    Entry Time Since Inactive: 3 seconds (2020-08-24 16:07:45)
    Entry State: inactivity limit exceeded
  • ロールには、以下を入力します。
    Copy to Clipboard Toggle word wrap
    # dsidm -D "cn=Directory Manager" ldap://server.example.com -b "dc=example,dc=com" role entry-status "cn=Marketing,ou=People,dc=example,dc=com"
    Entry DN: cn=Marketing,ou=people,dc=example,dc=com
    Entry State: activated
エントリーの代わりにサブツリーのステータスを表示するには、entry-status オプションの代わりに subtree-status を使用します。subtree-status オプションを使用する場合は、フィルター (-f) と検索範囲 (-s) を指定して結果を絞り込むことができます。また、-i オプションを使用して検索を絞り込み、非アクティブアカウントのみを返すか、-o date オプションを使用して、指定した日付までに非アクティブになるアカウントのみを返したりすることができます。
Copy to Clipboard Toggle word wrap
# dsidm -D "cn=Directory Manager" ldap://server.example.com -b "dc=example,dc=com" account account "ou=People,dc=example,dc=com"  -f "(uid=*)" -V -o "2020-08-25T14:30:30"
YYYY-MM-DDTHH:MM:SS 形式で日付を指定します。

20.16.2. コマンドラインを使用したユーザーおよびロールの非アクティブ化およびアクティブ化

非アクティブにするには、次のコマンドを実行します。
  • ユーザーアカウントで、以下を入力します。
    Copy to Clipboard Toggle word wrap
    # dsidm -D "cn=Directory Manager" ldap://server.example.com -b "dc=example,dc=com" account lock "uid=user_name,ou=People,dc=example,dc=com
  • ロールには、以下を入力します。
    Copy to Clipboard Toggle word wrap
    # dsidm -D "cn=Directory Manager" ldap://server.example.com -b "dc=example,dc=com" role lock "cn=Marketing,ou=People,dc=example,dc=com
有効にするには、次のコマンドを実行します。
  • ユーザーアカウントで、以下を入力します。
    Copy to Clipboard Toggle word wrap
    # dsidm -D "cn=Directory Manager" ldap://server.example.com -b "dc=example,dc=com" account unlock "uid=user_name,ou=People,dc=example,dc=com
  • ロールには、以下を入力します。
    Copy to Clipboard Toggle word wrap
    # dsidm -D "cn=Directory Manager" ldap://server.example.com -b "dc=example,dc=com" role unlock "cn=Marketing,ou=People,dc=example,dc=com
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat, Inc.