HP CIFS Server Administrator's Guide Version A.03.01.04 (5900-2303), April 2012

Table 12 Migration scripts (continued)
DescriptionScript Name
Migrates services in the /etc/services file.migrate_services.pl
3
Specifies a set of routines and configuration information all the perl scripts
use.
migrate_common.ph
1
Systems have been configured with the same host name, then the migration script migrate_host.pl will create multiple
entries in its resulting LDIF file with the same distinguished name for the host name for each of the IP addresses. Since
distinguished names need to be unique in an LDAP directory, you need to first manually merge the IP addresses with
one designated host record and delete the duplicated records in your LDIF file. A resulting merge might look as follows:
. . . .
dn: cn=machineA, ou=hosts, ou=unix, dc=org, dc=hp, dc=com
objectClass: top
objectClass: ipHost
ipHostNumber: 1.3.5.72
ipHostNumber: 1.3.8.4
ipHostNumber: 1.5.8.76
cn: hostA
cn: hostA.org.hp.com
. . . .
2
Netgroup
- The NIS optimization maps 'byuser' and 'byhost' are not utilized.
-Each triple is stored as a single string.
-Each triple must be enclosed by parentheses. For example, "(machine, user, domain)" is a valid triple while "machine,
user, domain" is not.
3
When migrating services data into the LDAP directory, You keep in mind that only multiple protocols can be associated
with one service name, but not multiple service ports.
Examples
Complete the following steps to migrate the /etc/passwd file to the LDIF file:
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_passwd.pl, to migrate all data in the /etc/passwd
file to the /tmp/passwd.ldif file:
$ migrate_passwd.pl /etc/passwd /tmp/passwd.ldif
A part of the output is as follows:
dn: uid=johnl,ou=People,dc=org,dc=hp,dc=com
objectclass: top
objectclass: account
objectclass: posixAccount
objectclass: Account
loginShell: /usr/bin/ksh
uidNumber: 8662
gidNumber: 8200
homeDirectory: /home/johnl
gecos: John Louie, 48S-020, 447-1890
userPassword: {crypt}aOACGvt0T, 1foacctFlags: UX
pwdLastSet: 1063301239
Migrating your data from one backend to another
Use the syncsmbpasswd tool to synchronize Samba user accounts with all currently available
POSIX user accounts in the configured password database backend. If you set the passdb
Migrating your data to the directory server 91