Command-Line Scripts Quick Reference224 Netscape Directory Server Configuration, Command, and File Reference • May 2002Command-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’s 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.”)Also note that when you are running the Perl scripts on Windowsmachines you must make sure that the path environment variablecontains the Perl executable (perl.exe) file. For this reason, makesure to run the scripts from the following directory on thesemachines: \usr\netscape\servers\bin\slapd\admin\binTable 8-1 Commonly Used Command-Line Shell and Batch ScriptsCommand Line Script Descriptionbak2db Restores the database from the most recent archived backup.Located in: /usr/netscape/servers/slapd-serverIDdb2bak Creates a backup of the current database contents.Located in: /usr/netscape/servers/slapd-serverIDdb2ldif Exports the contents of the database to LDIF.Located in: /usr/netscape/servers/slapd-serverIDdb2dsml Exports the contents of the database to DSML.Located in: /usr/netscape/servers/slapd-serverIDdsml2db Imports DSML file to the database.Located in: /usr/netscape/servers/slapd-serverIDgetpwenc Prints the encrypted form of a password using one of the server’s encryptionalgorithms. If a user cannot log in, you can use this script to compare the user’spassword to the password stored in the directory.Located in: /usr/netscape/servers/slapd-serverID