Command-Line Scripts Quick Reference256 Red Hat Directory Server Configuration, Command, and File Reference • May 2005Command-Line Scripts Quick ReferenceNOTE In order to execute the Perl scripts, you must change to the directorywhere the scripts are stored. Although it is possible to setcommand-path and library-path variables to execute the scripts, it isnot recommended because you run the risk, particularly when youhave more than one server version installed, of disrupting thecorrect execution of other utilities. There is also the risk ofcompromising the security of the system.(The same procedure also applies to the command-line utilitiesdiscussed in chapter 7, “Command-Line Utilities.”)Table 8-1 Commonly Used Command-Line Shell ScriptsCommand-LineScriptDescription Locationbak2db Restores the database from the most recent archivedbackup.serverRoot/slapd-serverIDdb2bak Creates a backup of the current database contents. serverRoot/slapd-serverIDdb2ldif Exports the contents of the database to LDIF. serverRoot/slapd-serverIDdb2dsml Exports the contents of the database to DSML. serverRoot/slapd-serverIDdb2index Reindexes the database index files. serverRoot/slapd-serverIDdsml2db Imports DSML file to the database. serverRoot/slapd-serverIDgetpwenc Prints the encrypted form of a password using oneof the server’s encryption algorithms. If a usercannot log in, you can use this script to compare theuser’s password to the password stored in thedirectory.serverRoot/slapd-serverIDldif2db Imports LDIF files to the database.Runs the ns-slapd command-line utility with theldif2db keyword. By default, the script first savesand then merges any existing configuration tree(o=NetscapeRoot) with any files to be imported.serverRoot/slapd-serverIDldif2ldap Performs an import operation over LDAP to theDirectory Server.serverRoot/slapd-serverID