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.
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.
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.
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
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.
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!