Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun ONE Directory Server Resource Kit 5.2 Tools Reference 

Chapter 31
Unsupported Utilities

This chapter provides brief descriptions of the unsupported utilities installed with the Sun™ ONE Directory Server Resource Kit (DSRK). It contains the following sections:


PerLDAP is a third-party tool that has libraries of Perl routines for accessing a directory server and performing LDAP operations. The source code and more information about it can be found at:

In order to use the PerLDAP libraries installed along with the Directory Server Resource Kit, you must first build and install its libraries. In this procedure, DSRK_base refers to the base directory of your Directory Server Resource Kit installation. By default this is /opt/iPlanet. The procedure is also described in the file DSRK_base/unsupported/perLdap/INSTALL.

  1. Change to the directory in which PerLDAP was installed.
  2. % cd DSRK_base/unsupported/perLdap

  3. Run the Perl makefile.
  4. % perl Makefile.PL PREFIX=DSRK_base LIB=DSRK_base

  5. Enter the information in bold, when prompted.
  6. Code Example 31-1  Information Needed for perLDAP Build

    PerLDAP - Perl 5 Module for LDAP


    Directory containing ’include’ and ’lib’ directory of the iPlanet

    LDAP Software Developer Kit (default: /usr): DSRK_base/lib/ldapcsdk

    Using LDAPv3 Developer Kit (default: yes)? yes

    Include SSL Support (default: yes)? yes

    Located multiple libraries:




    Libraries to link with(default:-LinstallDir/lib/ldapcsdk/lib -lldap50):

    -LDSRK_base/lib/ldapcsdk/lib -lssldap50 -lssl3 -lprldap50 -lplds4

    -lplc4 -lnss3 -lnspr4 -lldap50 -lldif50 -llber50 -liutil50

    Writing Makefile for Mozilla::LDAP::API

  7. Install the perLDAP libraries with the make utility:
  8. % make install

You can now run any Perl script requiring the PerLDAP libraries as follows:

% perl -IDSRK_base

Perl Scripts

The unsupported Perl scripts are small utilities that perform a variety of maintenance tasks. Some perform specific, programmed actions and will not work outside of their designated context. Others do not perform error checking and should be used only if you understand their behavior.


Sun Microsystems makes no claim as to the suitability or correctness of these scripts. Use them at your own risk.

The scripts discussed in Table 31-1 are provided solely as examples of Perl shell programming and examples of using PerLDAP routines to access a directory.

Table 31-1  Unsupported Utilities in DSRK_base/unsupported/perl  

Script Name

Intended Usage

Add users to an LDAP directory.

Find an entry with a given changenumber.

Move mail server core files into a publishable area.

Read a set of DNs and produce the LDIF output.

Generate the equivalent of a /etc/auto.home file with data extracted from an LDAP directory.

Generate the equivalent of a /etc/mailgroups.aliases file with data extracted from an from LDAP directory.

Modify the copiedfrom attribute, which is sometimes needed to get replication working.

Generate the equivalent of a /etc/mlm-aliases/aliases.{intern,extern} file with data extracted from an LDAP directory.

Generate the equivalent of a /etc/passwd file with data extracted from an LDAP directory.

Import the information of a SmartList mail alias into an LDAP directory.

Import the NIS auto.home map into an LDAP directory.

Import the EtherPage epage.users file into an LDAP directory.

Reports inconsistencies between LDAP and NIS data.

Gives an example of how to automate certain system administration tasks.

Update mailRecipient information for a user.

Move an LDAP entry from one specific server to another.

Perform a stress test with searches simulating Message Server load on an LDAP server.

Change the password of one or more users.

Gather statistics from an LDAP server.

Perform an LDAP search with a command-line that emulates the UNIX finger command.

Manage a mailing list or any other group from the command-line.

Move an entry from one subtree to another by creating the new entry, copying the attributes, and deleting the old entry.

Add or delete one or more object classes from one or more entries.

Normalize phone numbers and make sure they have the correct US area code.

Perform a quick and simple LDAP search for an entry.

Modify or delete an attribute for one or more entries.

Rename one or more attributes in entries matching the search criteria.

Check the replication status on a Master and its replica.

Restart a DS server under certain conditions.

Remove duplicate attribute values from all entries.

Remove one or more LDAP entries interactively.

Generate a tab-separated output of entries matching the search criteria.

Similar to gives an example of how to automate certain system administration tasks.

Synchronize all UIDs with their mail attribute.

Check the consistency between the data on a mail server and in an LDAP directory.

Verify that the mail and mailalternate attributes are not duplicates for any entry in a directory.

Display a subset of attribute values for all entries in the directory.

Previous      Contents      Index      Next     

Copyright 2004 Sun Microsystems, Inc. All rights reserved.