HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

5. Select the database is read-only checkbox.
The change takes effect immediately.
Before importing or restoring the database, ensure that the databases affected by the operation
are not in read-only mode.
To disable read-only mode, open the database up in the Directory Server Console again and
uncheck the database is read-only checkbox.
2.3.2.1.2 Making a database read-only from the command line
To manually place a database into read-only mode:
1. Run ldapmodify.
ldapmodify -D "cn=directory manager" -w secret -p 389 -h server.example.com
2. Change the read-only attribute to on.
dn: cn=database_name,cn=ldbm database,cn=plugins,cn=config
changetype: modify
replace: nsslapd-readonly
nsslapd-readonly: on
NOTE:
By default, the name of the database created at installation time is userRoot.
2.3.2.1.3 Placing the entire directory server in read-only mode
If the Directory Server maintains more than one database and all databases need to be placed in
read-only mode, this can be done in a single operation.
CAUTION:
This operation also makes the Directory Server configuration read-only; therefore, you cannot
update the server configuration, enable or disable plug-ins, or even restart the Directory Server
while it is in read-only mode. After read-only mode is enabled, it cannot be undone from the
Console; you must modify the configuration files.
NOTE:
If Directory Server contains replicas, do not use read-only mode because it will disable replication.
To put the Directory Server in read-only mode:
1. In the Directory Server Console, select the Configuration tab, then select the top entry in the
navigation tree in the left pane.
2. Select the Settings tab in the right pane.
44 Configuring Directory Databases