LDAP-UX Client Services B.04.00 with Microsoft Windows 2000/2003 Active Directory Administrator's Guide
Command, Tool, and Migration Script Reference
Name Service Migration Scripts
Appendix C 177
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=cup,DC=hp,DC=com”
$ migrate_passwd_ads.pl /etc/passwd
dn: cn=Joe Bloggs,cn=Users,dc=cup, dc=hp, dc=com
objectClass: user
a. 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
....
b. Special characters (for example, Tab, control
characters) are not allowed in the gecos field of
password entries.
c. 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.