LDAP-UX Client Services B.04.00 Administrator's Guide

Command and Tool Reference
Name Service Migration Scripts
Chapter 5164
Examples
The following are some examples using the migration scripts.
The following command converts all name service files in /etc to LDIF:
$ migrate_all_online.sh
The following commands convert /etc/passwd into LDIF and output it to
stdout:
$ export LDAP_BASEDN=”dc=aceindustry,dc=com”
$ migrate_passwd.pl /etc/passwd
dn: uid=jbloggs,ou=People,dc=aceindustry,dc=com
uid: jbloggs
cn: Joe Bloggs
objectclass: top
objectclass: posixAccount
objectclass: account
userPassword: {crypt}daCXgaxahRNkg
loginShell: /bin/ksh
uidNumber: 20
gidNumber: 20
homeDirectory: /home/jbloggs
gecos: Joe Bloggs,42U-C3,555-1212
The following commands convert /etc/group into LDIF and place the
result in /tmp/group.ldif:
$ export LDAP_BASEDN=”o=hp.com”
$ migrate_group.pl /etc/group /tmp/group.ldif
dn: cn=mira.aceindustry.com,ou=Groups,o=hp.com
objectclass: posixGroup
objectclass: top
cn: mira
cn: www.hp.com
cn: mira.hp.com
userPassword: {crypt}*
gidNumber: 325
The following command migrates /etc/hosts:
c. When migrating services data into the LDAP
directory, users should keep in mind that only
multiple protocols can be associated with one
service name, but not multiple service ports.