LDAP-UX Client Services B.04.10 with Microsoft Windows Active Directory Server Administrator's Guide

1
Systems have been configured with the same hostname, then the migration script migrate_host.pl, will create
multiple entries in its resulting LDIF file with the same DN for the hostname for each of the IP addresses. Since DNs
need to be unique in an LDAP directory, users should first manually merge the IP addresses with one designated
host record and delete the duplicated records in their LDIF file. A resulting merge might look as follows:
. . . .
dn: cn=machineA, ou=hosts, ou=unix, dc=cup, dc=hp, dc=com
objectClass: top
objectClass: computer
ipHostNumber: 15.13.130.72
ipHostNumber: 15.13.104.4
ipHostNumber: 15.13.95.92
cn: machineA
machineA
. . . .
2 Special characters (for example, Tab, control characters) are not allowed in the gecos field of password entries.
3 When migrating services data into the LDAP directory, users should keep in mind that only multiple protocols can
be associated with one service name, but not multiple service ports.
Environment Variables
When using the Perl scripts to migrate individual files, you must set the following mandatory
environment variables:
LDAP_BASEDN The base distinguished name where you want your data.
For example, the following command sets the base DN to DC=example,
DC=hp, DC=com:
export LDAP_BASEDN="DC=example, DC=hp, DC=com"
SYNC_NISDOMAIN Windows 2000 domain where the NIS objects reside.
General Syntax for Perl Migration Scripts
All the Perl migration scripts use the following general syntax:
scriptname inputfile [outputfile]
where:
scriptname
is the name of the particular script you are using. The scripts are listed below.
inputfile
is the name of the appropriate name service source file corresponding to the
script you are using.
outputfile is optional and is the name of the file where the LDIF is written. stdout is the
default output.
Examples
The following are some examples using the migration scripts.
The following command converts all NIS files in /etc to LDIF:
$ migrate_all_online.sh
The following commands convert /etc/passwd into LDIF and output it to stdout:
$ export LDAP_BASEDN="DC=example,DC=hp,DC=com"
$ migrate_passwd_ads.pl /etc/passwd
dn: cn=Joe Bloggs,cn=Users,dc=example, dc=hp, dc=com
objectClass: user
msSFUName: jbloggs
cn: Joe Bloggs
syncNisDomain: cup
loginShell: /usr/bin/sh
186 Command, Tool, Schema Extension Utility, and Migration Script Reference