HP CIFS Server Administrator's Guide Version A.03.01.01 (5900-1282, May 2011)

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” (page 89).
The perl scripts obtain their information from the input source file and output LDIF.
Environment Variables
When using the perl scripts to migrate individual files, you need to set the following environment
variables:
LDAP_BASEDN The base distinguished name where you want to store your data.
For example, the following command sets the base DN to DC=org, DC=hp,
DC=com:
export LDAP_BASEDN="DC=org, DC=hp, DC=com"
General Syntax for Perl Migration Scripts
All the perl migration scripts use the following general syntax:
scriptname inputfile [outputfile]
where
scriptname This is the name of the particular script you are using. Table 6-2, lists the migration
scripts.
inputfile This is the name of the appropriate name service source file corresponding to the
script you are using.
outputfile This is an optional parameter and is the name of the file where the LDIF is saved.
stdout is the default output.
Migration Scripts
The migration scripts are described in Table 6-2 below.
Table 12 Migration Scripts
DescriptionScript Name
Creates base DN information.migrate_base.pl
Migrates groups in the /etc/group file.migrate_group.pl
Migrates hosts in the /etc/hosts file.migrate_hosts.pl
1
Migrates networks in the /etc/networks file.migrate_networks.pl
Migrates users in the /etc/passwd file.migrate_passwd.pl
2
Migrates protocols in the /etc/protocols file.migrate_protocols.pl
Migrates RPCs in the /etc/rpc file.migrate_rpc.pl
90 LDAP Integration Support