Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to setup a debian 6 to authenticate users against an ldap server. I have another machine (also debian 6) with apparently the same config and packages, and it works (I didn't configure this machine).
I'm running out of ideas.
The principal clue is this line in /var/log/auth:
pam_ldap: ldap_simple_bind Can't contact LDAP server
pam_ldap: reconnecting to LDAP server...
ldap_simple_bind Can't contact LDAP server
sshd[2122]: pam_unix(sshd:auth): authentication failure;...
This seems to be a network or connection problem, but the 'getent passwd' command works perfectly and returns the user list at ldap server. Also, performing an ldapsearch works perfectly. Very weird.
The libnss-ldap.conf, libnss-ldap.secret and /etc/pam.d/* files are the same that the machine that is working fine.
The logs at the ldap server are very very longs and gets me confused. I don't see anything relevant.
I'd guess the server is just not defined correctly in the ldap config file. I don't know how debian configures this tbh, but on rhel6+ ldap details for information is in a separate file to pam details. Run a tcpdump when logging in to see the tcp data flow... "tcpdump -vn -i eth0 port 389"
OK, so if it IS connecting, then capture the traffic and look at it in wireshark (add the options "-s0 -w somefile.cap" to store all data to a file) It will probably be very clear what the issue is as the ldap protocol level, even if you don't understand LDAP, wireshark decodes and describes things very well.
shit. My foult. It's solved. When I tried to login, I saw traffic with tcpdump, so I supposed that there were no connectivity issues. But that flow was only to get uid or something similar, not for auth. The /etc/pam_ldap.conf was not configured properly, so the auth was not working. That's why getent and ldapsearch worked, but not auth step.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.