In the previous tips for OpenDS, the LDAP directory server in Java, I’ve shown the long and exhaustive dsconfig commands. As you may have noticed, there are many properties to specify to reference the server: the hostname, the port number, the authentication DN… Those properties are used by most OpenDS command line tools and repeating them all the time can be tedious.
Fortunately, it is possible to set the default values for the OpenDS command line tools in a property file, stored either in a .opends directory in your home, or in the instance config directory.
Here’s a sample file :
$ cat ~/.opends/tools.properties
port=1389
dsconfig.port=4444
stop-ds.port=4444
hostname=localhost
bindDN=cn=Directory Manager
bindPassword=secret12
If you’re storing passwords in the file, make sure you’re not allowing other users to read the file.
You can find more details on the tools.properties file on OpenDS documentation wiki.
Technorati Tags: directory-server, ldap, opends, opensource, tip