LDAP-UX Client Services B.05.01 Administrator Guide for HP directory servers and Windows ADS

shell script gets information from the appropriate source files, such as /etc/passwd, /etc/group,
/etc/hosts, and so forth. The migrate_all_nis_online.sh script gets information from your
NIS maps using the ypcat command (for more information about this command, see the ypcat(1)
manpage). The scripts take no parameters but prompt you for needed information. They also prompt
you for whether to leave the output as LDIF or to add the entries to your directory. These scripts
call the perl scripts described in Section 9.6.3 (page 384). You must modify these scripts to ensure
that any calls to perl scripts not listed in Table 37 (page 384) are commented out, you must
comment out the following scripts in the file:
$PERL /opt/ldapux/migrate/migrate_fstab.pl
$PERL /opt/ldapux/migrate/migrate_netgroup_byuser.pl
$PERL /opt/ldapux/migrate/migrate_netgroup_byhost.pl
NOTE: The scripts use ldapmodify to add entries to your directory. If you are starting with an
empty directory, it might be faster for you to use ldif2db or ns-slapd ldif2db with the LDIF
file. For more information about ldif2db and ns-slapd, see the HP-UX Directory Server
configuration, command, and file reference.
9.6.3 Migrating individual files
The migration scripts described in this section 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 9.6.2
(page 383). These scripts get their information from the input source file and output LDIF.
9.6.3.1 Migration scripts
The migration scripts are described in Table 37.
Table 37 Scripts for migrating individual files
Description and notesScript Name
Creates base DN informationmigrate_base.pl
Migrates groups in /etc/groupmigrate_group.pl
Migrates hosts in /etc/hosts
Systems have been configured with the same host name, then
the migration script migrate_host.pl creates 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 must first manually merge the IP addresses with one
designated host record and delete duplicate records in their
LDIF file. The following shows a portion of what the resulting
merge might look like:
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
migrate_hosts.pl
384 Command and tool reference