Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to login to an Ubuntu VM using LDAP credentials. I have followed an internal company wiki and gotten as far as a successful login. However, I can only login with LDAP intermittently.

Most often, if I reboot the VM, I can not log in with LDAP credentials. It passes the username/password, but hangs on a black screen. I then reboot, log in to the local account and check /var/log/auth.log. I read errors similar to the following:

could not search LDAP server - Server is unavailable

failed to bind to LDAP server ldap://hostname.our.server: Can't contact LDAP server

I am able to ping hostname.our.server.

Now, if I run "su myldapusername", I am prompted for my password and successfully switch. At this point I can sometimes log out of the local account and successfully log in to the LDAP account.

I can't explain why I can only intermittently complete the log in via LDAP. I'm guessing there is some kind of race condition. Anyway, while I still have hair, I would appreciate any help you can offer.

Cheers,

Brad

P.S. I suppose I should mention I'm using Ubuntu Desktop 12.04. For a hypervisor I have tried both VMware and VirtualBox, in order to rule out any weird bridged networking problem.

share|improve this question
    
This looks an awful lot like a DNS or network issue. LDAP authentication works if the network is stable. You should grab Wireshark or tcpdump and look at the network traffic. The LDAP protocol itself isn't too complicated either, you might be able to figure out what's going on. –  Janoszen Jun 13 '13 at 22:02

1 Answer 1

I ran the commands below based on this guide

sudo apt-get install ldap-auth-client nscd

sudo auth-client-config -t nss -p lac_ldap

This differed from the commands I ran based on our internal documents. Seems to work now, so I'm going to move on. Thanks for the input.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.