Monday 22 August 2011

Creating LDAP entry

All the information you can store in a Network Information Service (NIS) can also be stored in an LDAP server. This article describes how to use the 389 Directory Server to function as a Network Information Service by showing how to store the list of service as an example.

Creating an LDAP entry

 
1. Create a new organizational unit called Services that will hold all your services.
 
2. Select the Services organizational unit. Right click an empty space in the right pane, select New then click Other.
New Object 
3. In the New Object window, select ipservice and click OK.
 
4. Fill in the Full name, ipserviceport and ipserviceprotocol and click the Change button.
Change Naming Attribute 
5. In the Change Naming Attribute window, check cn and uncheck ipserviceprotocol. Click the OK button to close the Change Naming window and click OK again to close the Property Editor window.
Directory Services 
6. You should now have a service entry.

Configuring the Client

 
1. Edit the file /etc/ldap.conf and update at least the items below with the appropriate values for your environment.
host ldap.acme.local
base dc=acme,dc=local
nss_base_services ou=Services,dc=acme,dc=local?one
Edit nsswitch.conf 
2. Edit the file /etc/nsswitch.conf and add ldap in the services entry. This will tell the system to also look in the LDAP server when enumerating the list of service.
Edit nsswitch.conf 
3. To test, type in the command below. You should be able to see the entry you added.
getent services

No comments:

Post a Comment

Do not post irrelevant comments, please!

Browser Name:
Browser Version:
Browser Code Name:
User-Agent: