LDAP-UX Client Services B.04.15 Administrator's Guide

6.6 Name Service Migration Scripts
This section describes the shell and perl scripts that can migrate your name service data either
from source files or NIS maps to your LDAP directory. These scripts are found in
/opt/ldapux/migrate. The two shell scripts migrate_all_online.sh and
migrate_all_nis_online.sh migrate all your source files or NIS maps, while the perl scripts
migrate_passwd.pl, migrate_group.pl, migrate_hosts.pl, and so forth, migrate
individual maps. The shell scripts call the perl scripts.
The migration scripts require perl, version 5 or later, which is installed with the NIS/LDAP
Gateway in /opt/ldapux/contrib/bin/perl.
6.6.1 Naming Context
The naming context specifies where in your directory your name service data will be, under the
base DN. For example, if your base DN is "ou=unix,o=hp.com," the passwd map would be at
"ou=People,ou=unix,o=hp.com". Default Naming Context (page 230) shows the default naming
context for the supported services. The default will work in most cases.
Table 6-14 Default Naming Context
Location in the Directory TreeMap Name
ou=Peoplepasswd
ou=Groupsgroup
ou=Netgroupnetgroup
ou=Deviceshosts
ou=Networksnetworks
ou=Protocolsprotocols
ou=Rcprpc
ou=Servicesservices
If you change the default naming context, modify the file migrate_common.ph and change it to
reflect your naming context.
6.6.2 Migrating All Your Files
The two shell scripts migrate_all_online.sh and migrate_all_nis_online.sh migrate
all your name service data either to LDIF or into your directory. The migrate_all_online.sh
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(1) command. 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 under Migrating Individual Files
(page 231). You will need to modify these scripts to ensure that any calls to perl scripts not listed
in Table 5-6 are commented out, you need to 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
230 Command and Tool Reference