7.2. Command-Line Scripts Quick Reference

7.2. Command-Line Scripts Quick Reference

The following shell and Perl scripts are located in the /usr/lib/dirsrv/slapd-instance_name directory.

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 backend 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 Administration Server configuration to NetscapeRoot partition.
saveconfig Saves Administration 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 backend name.
verify-db.pl Checks backend database files.
vlvindex Creates and generates virtual list view (VLV) indexes.
Table 7.1. Shell Scripts in /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.
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.
verify-db.pl Checks backend database files.
Table 7.2. Perl Scripts in /usr/lib/dirsrv/slapd-instance_name

Script Name Description Perl or Shell Script
cl-dump Dumps and decodes the changelog. Shell
cl-dump.pl Dumps and decodes the changelog. Perl
logconv.pl Analyzes the access logs of a Directory Server to extract usage statistics and count the occurrences of significant events. 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
repl-monitor Provides in-progress status of replication. Shell
repl-monitor.pl Provides in-progress status of replication. Perl
Table 7.3. Scripts in /usr/bin


Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.