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

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:

http://www.mozilla.org/directory/perldap.html

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:

      - libldap50.so

      - libssldap50.so

      - libprldap50.so

    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 script.pl


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.


Caution

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

adduser.pl

Add users to an LDAP directory.

changes2ldif.pl

Find an entry with a given changenumber.

corescoop.pl

Move mail server core files into a publishable area.

dn2ldif.pl

Read a set of DNs and produce the LDIF output.

export_auto_home.pl

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

export_mailgroups.pl

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

fixcopiedfrom.pl

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

genaliases.pl

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

genpasswd.pl

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

import_aka.pl

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

import_auto_home.pl

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

import_epage.pl

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

inconsist.pl

Reports inconsistencies between LDAP and NIS data.

layoff.pl

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

ldap_mail.pl

Update mailRecipient information for a user.

ldap_migrate.pl

Move an LDAP entry from one specific server to another.

ldap_stress.pl

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

ldappasswd.pl

Change the password of one or more users.

ldapstats.pl

Gather statistics from an LDAP server.

lfinger.pl

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

mgroup.pl

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

migrate_user.pl

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

modclass.pl

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

normphones.pl

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

qsearch.pl

Perform a quick and simple LDAP search for an entry.

rand_mods.pl

Modify or delete an attribute for one or more entries.

renattr.pl

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

repstat.pl

Check the replication status on a Master and its replica.

restarter.pl

Restart a DS server under certain conditions.

rmduplicates.pl

Remove duplicate attribute values from all entries.

rmentry.pl

Remove one or more LDAP entries interactively.

tabdump.pl

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

termuser.pl

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

uidsynch.pl

Synchronize all UIDs with their mail attribute.

vrfyPO.pl

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

vrfymail.pl

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

wits_dump.pl

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



Previous      Contents      Index      Next     


Copyright 2004 Sun Microsystems, Inc. All rights reserved.