Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
20.16. Manually Inactivating Users and Roles
A single user account or set of accounts can be temporarily inactivated. Once an account is inactivated, a user cannot bind to the directory. The authentication operation will fail.
Users and roles are inactivated using the operational attribute
nsAccountLock
. When an entry contains the nsAccountLock
attribute with a value of true
, the server rejects the bind.
The same procedures are used to inactivate users and roles. However, when a role is inactivated, the members of the role are inactivated, not the role entry itself. For more information about roles in general and how roles interact with access control in particular, see Chapter 8, Organizing and Grouping Entries.
Warning
The root entry (the entry corresponding to the root or sub suffix) on a database cannot be inactivated. Chapter 3, Managing Directory Entries has information on creating the entry for a root or sub suffix, and Chapter 2, Configuring Directory Databases has information on creating root and sub suffixes.
20.16.1. Displaying the Status of an Account or Role Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
To display the status of:
- An account, enter:
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"
# 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Pass the-V
option to the command to display additional details:Copy to Clipboard Copied! Toggle word wrap Toggle overflow The previous output is an example of an active account, as indicated by the last two lines of the output. An inactive account would instead provide output similar to the following:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - A role, enter:
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"
# 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
To display the status of a sub-tree instead of an entry, use the
subtree-status
instead of the entry-status
option. When you use the subtree-status
option, you can specify a filter (-f
) and a search scope (-s)
to narrow down the results. Additionally, you can refine the search using the -i
option to return only inactive accounts or the -o date
option to return only accounts which will be inactive before the specified date:
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"
# 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"
Specify the date in the following format: YYYY-MM-DDTHH:MM:SS
20.16.2. Inactivating and Activating Users and Roles Using the Command Line Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
To inactivate:
- A user account, enter:
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
# 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 Copied! Toggle word wrap Toggle overflow - A role, enter:
dsidm -D "cn=Directory Manager" ldap://server.example.com -b "dc=example,dc=com" role lock "cn=Marketing,ou=People,dc=example,dc=com
# 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 Copied! Toggle word wrap Toggle overflow
To activate:
- A user account, enter:
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
# 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 Copied! Toggle word wrap Toggle overflow - A role, enter:
dsidm -D "cn=Directory Manager" ldap://server.example.com -b "dc=example,dc=com" role unlock "cn=Marketing,ou=People,dc=example,dc=com
# dsidm -D "cn=Directory Manager" ldap://server.example.com -b "dc=example,dc=com" role unlock "cn=Marketing,ou=People,dc=example,dc=com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow