LDAP-UX Client Services B.05.01 Administrator Guide for HP directory servers and Windows ADS

Table 37 Scripts for migrating individual files (continued)
Description and notesScript Name
Migrates netgroups in /etc/netgroup
Netgroup
- In LDAP-UX, netgroups are stored using the traditional
netgroup-triple syntax. In contrast with NIS,byuser and
byhost optimization maps are not used
- 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
migrate_netgroup.pl
Migrates users in /etc/passwdmigrate_passwd.pl
Migrates protocols in /etc/protocolsmigrate_protocols.pl
Migrates RPCs in /etc/rpcmigrate_rpc.pl
Migrates services in /etc/services
When migrating services data into the LDAP directory, users
should keep in mind that only multiple protocols can be
associated with one service name; multiple service ports
cannot be associated with one service name.
migrate_services.pl
9.6.3.2 Environment variables
When using the perl scripts to migrate individual files, you must set the following environment
variable:
LDAP_BASEDN The base distinguished name where you want to put data in the LDAP directory.
For example, the following command sets the base DN to "o=hp.com":
export LDAP_BASEDN="o=hp.com"
9.6.3.3 General syntax for perl migration scripts
All the perl migration scripts use the following general syntax:
scriptname inputfile [outputfile]
where
scriptname is the name of the particular script you are using. The scripts are listed
subsequently.
inputfile is the name of the appropriate name service source file corresponding to the
script you are using.
outputfile is optional and is the name of the file where the LDIF is written. stdout is the default
output.
9.6.4 Examples
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=hp,dc=com"
$ migrate_passwd.pl /etc/passwd
dn: uid=jbloggs,ou=People,dc=hp,dc=com
uid: jbloggs
cn: Joe Bloggs
objectclass: top
9.6 Name service migration scripts 385