Migrating NIS+ to LDAP

Importing Your NIS+ Data to Your LDAP Directory Server

Step

7.

Create the file that will contain all the data extracted from the NIS+

 

 

server and placed into a LDIF formatted file:

 

 

rm main.ldif

 

 

touch main.ldif

Step

8. If you do not have the credential tables on the NIS+ server that you want

 

 

to migrate, then skip this step and go to step 10.

 

 

Run the cred_table_sort.pl script to extract the credential table

 

 

entries including public key and secret key of users and hosts from the

 

 

NIS+ server. This creates the two files, passwd.cred.etc and

 

 

host.cred.etc:

 

 

./cred_table_sort.pl

Step

9.

Run the following two scripts that migrate the credential files,

 

 

passwd.cred.etc and host.cred.etc, created in step 8 into two LDIF

 

 

files, passwd.ldif and hosts.ldif. Place passwd.ldif and

 

 

hosts.ldif into a LDIF formatted file, such as main.ldif:

 

 

../migrate_passwd.pl passwd.cred.etc passwd.ldif

 

 

../migrate_hosts.pl host.cred.etc hosts.ldif

 

 

cat passwd.ldif hosts.ldif >> main.ldif

 

 

 

NOTE

 

In an NIS+ server, the public key and secret (private) key are stored in

 

 

the same directory entries for which those keys are associated. Because

 

 

of this, the passwd.cred.etc and host.cred.etc files generated by the

 

 

cred_table_sort.pl script must be migrated into the passwd.ldif

 

 

and hosts.ldif files. You must manually use the

 

 

/opt/ldapux/migrate/migrate_passwd.pl script to migrate the

 

 

passwd.cred.etc file to the passwd.ldif file and use the

 

 

/opt/ldapux/migrate/migrate_hosts.pl script to migrate the

 

 

host.cred.etc file to the hosts.ldif file.

 

 

 

Step 10. If you do not want to migrate the AutoFS maps to the LDAP directory, then go to step 12. Otherwise, go to step 11.

Determine which AutoFS maps you have and which maps you want to migrate to the LDAP server.

28

Chapter 2