Thread View: fj.net.ldap
1 messages
1 total messages
Started by Jörg Ellermann
Thu, 02 Sep 2004 19:00
LDAP authentication fails
Author: Jörg Ellermann
Date: Thu, 02 Sep 2004 19:00
Date: Thu, 02 Sep 2004 19:00
63 lines
3145 bytes
3145 bytes
Hi
I'm trying to authenticate users via an OpenLDAP-Server (that I do not manage
myself). It's a simple PHP-script:
<?
$ldap_server = 'ldap.server.de';
$ldaprdn = 'uid=12345,ou=People,dc=server,dc=de';
$ldappass = 'passwort';
$ds = ldap_connect($ldap_server);
if ($ds) {
$r = ldap_bind($ds, $ldaprdn, $ldappass);
echo "Bind result is ".$r."<p>";
ldap_close($ds);
} else {
echo "<h4>Unable to connect to LDAP server</h4>";
}
?>
I'm always getting "Unable to bind to server: Invalid credentials" as a result.
ldap_search works perfectly, though.
The LDAP server gets its user's passwords from a Kerberos5 server.
But: if I am logged in as user 12345 on the same machine (Unix), I can
authenticate at the LDAP server with ldapwhoami:
OpenLDAP-Logfile (Login with ldapwhoami -W)
slapd[14320]: conn=1 fd=8 ACCEPT from IP=(Adresse) (IP=0.0.0.0:389)
slapd[14320]: conn=1 op=0 SRCH base="" scope=0 filter="(objectClass=*)"
slapd[14320]: conn=1 op=0 SRCH attr=supportedSASLMechanisms
slapd[14320]: conn=1 op=0 ENTRY dn=""
slapd[14320]: conn=1 op=0 RESULT tag=101 err=0 text=
slapd[14320]: conn=1 op=1 BIND dn="" method=163
slapd[14320]: conn=1 op=2 BIND dn="" method=163
slapd[14320]: conn=1 op=3 BIND dn="" method=163
slapd[14320]: SASL [conn=1] Error: unable to open Berkeley db /etc/sasldb2: No
such file or
directory
slapd[14320]: conn=1 op=3 BIND authcid="12345@SERVER.DE"
slapd[14320]: conn=1 op=3 BIND
dn="uid=12345,cn=server.de,ou=people,dc=server,dc=de" mech=G
SSAPI ssf=56
Login attempt with my Skript (from a different machine):
slapd[14320]: conn=3 fd=8 ACCEPT from IP=(Adresse) (IP=0.0.0.0:389)
slapd[14320]: conn=3 op=0 BIND dn="uid=12345,ou=People,dc=server,dc=de" method=128
slapd[14320]: conn=3 op=0 RESULT tag=97 err=49 text=
slapd[14320]: conn=3 op=1 SRCH base="ou=People,dc=server,dc=de" scope=2
filter="(uid=12345)"
slapd[14320]: conn=3 op=1 ENTRY dn="uid=12345,ou=People,dc=server,dc=de"
slapd[14320]: conn=3 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
slapd[14320]: conn=3 op=2 UNBIND
slapd[14320]: conn=3 fd=8 closed
Any ideas?
Thanks,
J�rg
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads