LDAP-UX Client Services B.05.00 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. For details on ldif2db and ns-slapd, see the HP-UX Directory Server configuration,
command, and file reference.
7.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 in Section 7.6.2 (page 326). These
scripts get their information from the input source file and output LDIF.
7.6.3.1 Migration scripts
The migration scripts are described in Table 7-14.
Table 7-14 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 host name, then the migration script migrate_host.pl will create multiple
entries in its resulting LDIF file with the same distinguished name for the host name 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.
7.6 Name service migration scripts 327