I'm new to LDAP and I already configured accounts with LDAP so I can login on few computers with LDAP.
Now I would like to add some host names to LDAP. In /etc/nsswitch.conf
I changed:
hosts: files dns ldap
But I have no idea how to add anything to LDAP database so it could resolve some names. I tried google but I couldn't find anything helpful.
On example, how to add this:
192.168.1.1 node1
I already figured it out with help of
migrationtools
(ubuntu package).First, create file
add_hosts.ldif
:Load it with:
Above steps should be done only once.
Then create file
node1_host.ldif
:I added second
cn
so it can resolve bothnode1
andn1
. If you want to add another host, just create another filenode2_host.ldif
and load it into LDAP.