Fetch port services from LDAP server

Hi,

We have a ldap server configured with services (port) and want to know how to fetch that to the ldap clients:

# cat /etc/nsswitch.conf|grep -i services
services: files sss (neither sss nor ldap works)

by doing "#getent services" I am getting only the result from /etc/services but I need to fetch all the services entry from LDAP server.

LDAP server:

Objectclass top
Objectclass Organizationunit
ou Services

Do we have to add anything on sssd.conf or ldap.conf to fetch services entry from LDAP?

# ldapsearch -x -b "ou=Services,dc=xxx,dc=xxx" "ipServicePort=10000"
# extended LDIF
#
# LDAPv3
# base <ou=Services,dc=xxx,dc=xxx> with scope subtree
# filter: ipServicePort=10000
# requesting: ALL
#

# portapp + tcp, Services, xxx.xxx
dn: cn=portapp+ipServiceProtocol=tcp,ou=Services,dc=xxx,dc=xxx
objectClass: top
objectClass: ipService
cn: portMMI
ipServiceProtocol: tcp
ipServicePort: 10000

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

Thanks in advance!

Regards,
Sridaran

We came to know there is a limitation set on LDAP query and it will not list all the port services configured in LDAP server. So you have to specify the exact port number to get the TCP/UDP port details from LDAP server EX:
#getent services 24678 --> this will search in /etc/services , if its not available then it will search in LDAP and give respective output.