HP CIFS Server 3.0k Administrator's Guide version A.02.04
Migrating Your data to the Directory Server
HP recommends that all UNIX user accounts either in the /etc/passwd file or NIS database
files are migrated to the Directory Server. The LDAP-UX Integration product provides migration
scripts to accomplish the task in an automated way. These scripts are located in /opt/ldapux/
migrate directory. The two shell scripts, migrate_all_online.sh and
migrate_all_nis_online.sh, migrate all your source files in the/etc directory or NIS
maps, while the perl scripts, migrate_passwd.pl, migrate_group.pl, and
migrate_hosts.pl, migrate individual files. The shell scripts call the perl scripts. For detailed
information for a complete description of the migration scripts, and what they do, and how to
use them, see the /opt/ldapux/README files or the "Name Service Migration Scripts" section of
LDAP-UX Client Services B.03.20 Administrator's Guide at http://docs.hp.com
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 an LDAP Data Interchange Format (LDIF) file or directly
into your directory. The migrate_all_online.sh shell script gets information from the source
files, such as /etc/passwd, /etc/group, and /etc/hosts. 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.
NOTE: HP recommends that you keeps a small subset of users in the /etc/passwd file, such
as the root user, IT manager. This allows root users having the different password across HP-UX
systems. Also, if the LDAP directory server is unavailable, you can still log into the system.
NOTE: Before you run the migration scripts, you must edit the /opt/ldapux/migrate/
migrate_common.ph file to change the default group objectclass under $RFC2307BIS structure
from ou=Group to ou=Groups. By doing this, it can match with the Samba organizational unit
defaults.
An Example
The following example shows the necessary steps to import your data into the LDAP directory
using the migration script, migrare_all_online.sh:
1. Set the environment variable, LDAP_BASEDN, to specify where you want to store your data:
For example, the following command sets the LDAP base DN to org.hp.com:
$ export LDAP_BASEDN="dc=org, dc=hp, dc=com"
2. Run the following script, migrate_all_online.sh, to migrate all name service data files
in the/etcfile to the LDIF file:
$ migrate_all_online.sh
Reply as appropriate to the script. In our example, use cn=Directory Manager and
credentials to bind with means the Directory Manager password.
NOTE: At this point, you have an LDAP directory server with everything you need to use
as a backend for pam and nsswitch. You need this first as the HP CIFS Server shares some
attributes from the posixAccount objectclass with the sambaSamAccount objectclass.
Migrating Individual Files
The following perl scripts migrate each of your source files in the /etcdirectory to LDIF. These
scripts are called by the shell scripts, described in the section “Migrating All Your Files”. The
perl scripts obtain their information from the input source file and output LDIF.
98 LDAP Integration Support