9.2. Command-Line Scripts Quick Reference

The following shell and Perl scripts are located in the /usr/lib64/dirsrv/slapd-instance/slapd-instance_name directory on Red Hat Enterprise Linux 5 (64-bit) and in /usr/lib/dirsrv/slapd-instance_name directory on Red Hat Enterprise Linux 5 (32-bit).

Table 9.1. Shell Scripts in /usr/lib64/dirsrv/slapd-instance/slapd-instance_name (or /usr/lib/dirsrv/slapd-instance_name)

Shell Script Description
bak2db Restores the database from the most recent archived backup.
db2bak Creates a backup of the current database contents.
db2ldif Exports the contents of the database to LDIF.
db2index Reindexes the database index files.
dbverify Checks back end database files.
ldif2db Imports LDIF files to the database. Runs the ns-slapd command-line utility with the ldif2db keyword.
ldif2ldap Performs an import operation over LDAP to the Directory Server.
monitor Retrieves performance monitoring information using the ldapsearch command-line utility.
restart-slapd Restarts Directory Server.
restoreconfig Restores by default the most recently saved Admin Server configuration to NetscapeRoot partition.
saveconfig Saves Admin Server configuration stored in the NetscapeRoot database to the /var/lib/dirsrv/slapd-instance_name/bak directory.
start-slapd Starts Directory Server.
stop-slapd Stops Directory Server.
suffix2instance Maps a suffix to a back end name.
upgradednformat Migrates older DN syntax formats to RFC 4514 compliant formats.
vlvindex Creates and generates virtual list view (VLV) indexes.

Table 9.2. Perl Scripts in /usr/lib64/dirsrv/slapd-instance/slapd-instance_name (or /usr/lib/dirsrv/slapd-instance_name)

Perl Script Description
bak2db.pl Restores the database from the most recent archived backup.
db2bak.pl Creates a backup of the current database contents.
db2index.pl Creates and regenerates indexes.
db2ldif.pl Exports the contents of the database to LDIF.
fixup-linkedattrs.pl Goes through all of the linked attributes in entries and updates the corresponding entries to have the correct managed attributes (and values).
fixup-memberof.pl Regenerates the memberOf on user entries to reflect changes in group membership.
ldif2db.pl Imports LDIF files to a database and runs the ns-slapd command-line utility with the ldif2db keyword.
ns-accountstatus.pl Provides account status information to establish whether an entry or group of entries is locked.
ns-activate.pl Activates an entry or a group of entries by unlocking them.
ns-inactivate.pl Deactivates an entry or a group of entries.
ns-newpwpolicy.pl Adds relevant entries required for the fine-grained (user- and subtree-level) password policy.
schema-reload.pl Reloads schema dynamically into the server instance.
syntax-validate.pl Checks existing data in a database to find any syntax violations in the attribute values.
usn-tombstone-cleanup.pl Deletes tombstone entries managed by the update sequence number plug-in for a server instance (as opposed to the replication tombstone entries).
verify-db.pl Checks back end database files.

Table 9.3. Scripts in /usr/bin and /usr/sbin

Script Name Description Perl or Shell Script
cl-dump Dumps and decodes the changelog. Shell
cl-dump.pl Dumps and decodes the changelog. Perl
ds_removal Removes a server instance. Shell
logconv.pl Analyzes the access logs of a Directory Server to extract usage statistics and count the occurrences of significant events. Perl
migrate-ds-admin.pl Migrates a Directory Server 7.1 instance. Perl
pwdhash Prints the encrypted form of a password using one of the server's encryption algorithms. If a user cannot log in, use this script to compare the user's password to the password stored in the directory. Shell
register-ds-admin.pl Re-registers a Directory Server instance with the local Admin Server. Perl
remove-ds.pl Removes a Directory Server instance. Perl
remove-ds-admin.pl Removes a Directory Server instance and its associated Admin Server instance. Perl
repl-monitor Provides in-progress status of replication. Shell
repl-monitor.pl Provides in-progress status of replication. Perl
restart-dirsrv Restarts a single Directory Server instance or all Directory Server instances. shell
restart-ds-admin Restarts the Admin Server instance. shell
setup-ds.pl Creates or recreates a Directory Server instance. Perl
setup-ds-admin.pl Creates a new Directory Server instance and local Admin Server instance. Perl
start-dirsrv Starts a single Directory Server instance or all Directory Server instances. shell
start-ds-admin Starts the Admin Server instance. shell
stop-dirsrv Stops a single Directory Server instance or all Directory Server instances. shell
stop-ds-admin Stops the Admin Server instance. shell