LDAP authentication fails

hidalgo

Well-Known Member
Nov 11, 2016
60
0
46
57
I created a LDAP realm and created users and groups. I added roles to groups and then I try to login with a LDAP user and it fails. The log says wrong credentials but the password is correct. Tried with different user – same result. My LDAP has anonymous bind and no security, my Proxmox has only a self signed certificate. But where is the problem? Any help to debug my problem?
 
I did some more testing. I created a lxe container with a ldap server for testing (domain2) and that works like expected.

Code:
cat /etc/pve/user.cfg
user:user@domain1:1:0:firstname:lastname:user@domain1:::
user:user@domain2:1:0:firstname:lastname:user@domain2:::

group:User:::
group:Administrator:user@domain1,user@domain2::

pool:Test:Testumfeld:999,100::


acl:1:/:@Administrator:Administrator:
acl:1:/:@User:PVEVMUser:
acl:1:/pool/Test:@User:PVESysAdmin:

Code:
cat /etc/pve/domains.cfg
pam: pam
    comment Linux PAM standard authentication

pve: pve
    comment Proxmox VE authentication server

ldap: domain1
    user_attr uid
    base_dn dc=unit,dc=domain1,dc=com
    server1 ldap.domain1.com
    default

ldap: domain2
    user_attr uid
    base_dn dc=domain2,dc=com
    server1 12.34.56.78

What’s wrong with domain1? The user is correct but the credentials aren’t.
 
When you login, what can you see in the log? What error are displayed? On Webinterface on the syslogtab. And on CMD with
Code:
journalctl -f
 
When you login, what can you see in the log? What error are displayed? On Webinterface on the syslogtab. And on CMD with
Code:
journalctl -f
I see always the same error
Code:
authentication failure; rhost=23.45.78.90 user=user@domain1 msg=Invalid credentials
 
Then the error looks likes on the ldapserver... when you login normal with SSH or X... with ldapauth on another host, this works? Does server1 works only with IP?
 
Then the error looks likes on the ldapserver... when you login normal with SSH or X... with ldapauth on another host, this works? Does server1 works only with IP?
Thank you. I have to speak with our LDAP guy. Hope he can help me.
 
Thank you. I have to speak with our LDAP guy. Hope he can help me.

Hi :
I have similar problem like this
Bash:
authentication failure; rhost=23.45.78.90 user=user@domain1 msg=no entries returned

I can ldapsearch our user account on PVE host. But I have no idea about how to fill in the suitable "base_dn" based on the explanation of wiki.
Code:
# user1 of People at our LDAP
dn: CN=[User Name],OU=[Department Name in traditional Chinese],OU=User,OU=C156,DC=[Company],DC=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
...
objectGUI:: di4ijo13n1wi3==
sAMAccountName: ABC12345

Code:
# /etc/pve/domains.cfg
ldap: realm-name
    base_dn OU=User,OU=C156,DC=[Company],DC=com
    server1 [LDAP Server IP]
    user_attr sAMAccountName
    port 389
    bind_dn [Authenticate User]

PS. The password of bind_dn has been stored in /etc/pve/priv/ldap/realm-name.pw
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!