Creates an LDAP Data Interchange Format (LDIF) file from a hosts file.
hosts2ldif [ -i InputFile ] [ -o OutputFile ] [ -s SearchBase ]
The /usr/sbin/hosts2ldif command creates a LDAP Data Interchange Format (LDIF) file from /etc/hosts or another file that looks like /etc/hosts. With no flags, the /etc/hosts file is used to create the /tmp/hosts.ldif LDIF file using cn=hosts as the baseDN.
The LDIF file created by this command is compliant with SecureWay(R) Directory Schema and is used for setting up the ldap mechanism. The ldap mechanism is supported, but the use of the nis_ldap mechanism rather than the ldap mechanism is recommended.
-i InputFile | Specifies the hosts file used for input. |
-o OutputFile | Specifies the LDIF file used for output. |
-s SearchBase | Specifies the baseDN of the host table on the LDAP server. |
hosts2ldif -o /home/ldifhosts
hosts2ldif -i /home/hosts.bak
hosts2ldif -o /home/ldifhosts -s cn=hosttab
/etc/hosts | Contains the Internet Protocol (IP) name and addresses of hosts on the local network. |
TCP/IP Name Resolution in the AIX 5L Version 5.2 System Management Guide: Communications and Networks.