LDAP-UX Client Services B.04.15 Administrator's Guide
NOTE: The scripts use ldapmodify to add entries to your directory. If you are starting with
an empty directory, it may be faster for you to use ldif2db or ns-slapd ldif2db with the
LDIF file. See the Netscape Directory Server Administrator's Guide for details on ldif2db and
ns-slapd.
6.6.3 Migrating Individual Files
The migration scripts shown below can be used to migrate the service data, groups, hosts,
netgroup, services, protocols, rpc, passwd individually from each of your source files in /etc to
LDIF. These scripts are called by the shell scripts described under Migrating All Your Files
(page 230). These scripts get their information from the input source file and output LDIF.
6.6.3.1 Migration Scripts
The migration scripts are described in the table below.
Table 6-15 Migration Scripts
DescriptionScript Name
creates base DN information.migrate_base.pl
migrates groups in /etc/group.migrate_group.pl
migrates hosts in /etc/hosts.migrate_hosts.pl
1
migrates netgroups in /etc/netgroup.migrate_netgroup.pl
2
migrates users in /etc/passwd.migrate_passwd.pl
migrates protocols in /etc/protocols.migrate_protocols.pl
migrates RPCs in /etc/rpc.migrate_rpc.pl
migrates services in /etc/services.migrate_services.pl
3
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 distinguished name for the hostname for each of the IP addresses.
Since distinguished names need to be unique in an LDAP directory, users need to 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=devices, ou=unix, o=hp.com
objectClass: top
objectClass: ipHost
objectClass: device
ipHostNumber: 15.13.130.72
ipHostNumber: 15.13.104.4
ipHostNumber: 15.13.95.92
cn: mymachine
cn: hpma01.cup.hp.com
. . . .
2 Netgroup
- The NIS optimization maps 'byuser' and 'byhost' are not utilized.
-Each triple is stored as a single string.
-Each triple must be enclosed by parentheses, e.g "(machine, user, domain)" is a valid triple while "machine, user,
domain" is not.
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.
6.6 Name Service Migration Scripts 231