-1

Hope everyone doing good.

Let me come to point, i have setup-ed a LDAP server and client machines

Server works perfect, while make a search from client machine it too get the Query from LDAP server, But while i switch user it says user not exists

[root@ldapc ~]# su - babin
su: user babin does not exist

I have tried this from client machine and i got the below reply

# ldapsearch -x -b dc=tecmintlocal,dc=com -h ldap.tecmintlocal.com

# extended LDIF
#
# LDAPv3
# base <dc=tecmintlocal,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# tecmintlocal.com
dn: dc=tecmintlocal,dc=com
dc: tecmintlocal
objectClass: top
objectClass: domain

# People, tecmintlocal.com
dn: ou=People,dc=tecmintlocal,dc=com
ou: People
objectClass: top
objectClass: organizationalUnit

# Group, tecmintlocal.com
dn: ou=Group,dc=tecmintlocal,dc=com
ou: Group
objectClass: top
objectClass: organizationalUnit

# tecmint_gp1, Group, tecmintlocal.com
dn: cn=tecmint_gp1,ou=Group,dc=tecmintlocal,dc=com
objectClass: posixGroup
objectClass: top
cn: tecmint_gp1
userPassword:: YWRtaW4xMjMk
gidNumber: 20000

# babin, People, tecmintlocal.com
dn: uid=babin,ou=People,dc=tecmintlocal,dc=com
uid: babin
cn: babin babin
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword:: YWRtaW4xMjMk
shadowLastChange: 16120
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 2000
gidNumber: 20000
homeDirectory: /home/babin

# tecmintclient, People, tecmintlocal.com
dn: uid=tecmintclient,ou=People,dc=tecmintlocal,dc=com
uid: tecmintclient
cn: tecmintclient tecmintclient
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword:: YWRtaW4xMjMk
shadowLastChange: 16120
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 2000
gidNumber: 20000
homeDirectory: /home/tecmintclient

# search result
search: 2
result: 0 Success

# numResponses: 7
# numEntries: 6

1 Answer 1

0

Have you actually configured the system to retrieve user accounts from LDAP?

For that you usually need to install a LDAP client like nslcd (aka nss-pam-ldapd), which will come with a NSS module to be added in /etc/nsswitch.conf (telling the system to use the LDAP client for obtaining user information).

(You'll also need to add a PAM module, for checking user passwords on login; it can be pam_ldap too, or something more secure like pam_krb5.)

If you already have the LDAP client installed, first make sure it has the correct "base DN" (search location) configured, and look for various logging/debug options.

Also check the LDAP traffic to see what searches are actually being done, using Wireshark:
tshark -n -Y ldap -VO ldap.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .