LDAP-UX Client Services B.05.00 Administrator's Guide
7.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.
7.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". Table 7-13 shows the default naming context for the supported
services. The default will work in most cases.
Table 7-13 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.
7.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 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 7.6.3 (page 327). You will need to modify these
scripts to ensure that any calls to perl scripts not listed in Table 7-14 (page 327) 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
326 Command and tool reference