LDAP macht mit 2.6.1 Probleme

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

spacewan
Posts: 24
Joined: Tue Mar 17, 2009 12:51 pm

LDAP macht mit 2.6.1 Probleme

Post by spacewan »

Hallo zusammen,
das Suchen hier im Forum rund um LDAP war nur bedingt ergiebig - oder ich war zu blind ;-)
Darum poste ich das jetzt einfach.

Ich bekomme diese Fehlermeldung beim Versuch des anmeldens (phpmyfaq 2.6.1):
phpMyFAQ warning [2]: ldap_bind() [function.ldap-bind]: Unable to bind to server: Invalid DN syntax in Ldap.php on line 104
phpMyFAQ notice [8]: Use of undefined constant PMF_USERERROR_INCORRECT_PASSWORD - assumed 'PMF_USERERROR_INCORRECT_PASSWORD' in AuthLdap.php on line 144.

Ich nutze php 5.2.0-8+etch16 unter debian 4.0r5 mit apache2 und meine config files sehen so aus:

config/ldap.php:
$PMF_LDAP["ldap_server"] = 'localhost';
$PMF_LDAP["ldap_port"] = '389';
$PMF_LDAP["ldap_user"] = 'cn=admin,dc=subdomain,dc=mydomain,dc=de';
$PMF_LDAP["ldap_password"] = 'daspassworthalt';
$PMF_LDAP["ldap_base"] = 'dc=subdomain,dc=mydomain,dc=de';

config/constants_ldap.php:
$PMF_LDAP['ldap_mapping'] = array (
'name' => 'cn',
'username' => 'uid',
'mail' => 'mail');
$PMF_LDAP['ldap_use_domain_prefix'] = false;
$PMF_LDAP["ldap_options"] = array (
LDAP_OPT_PROTOCOL_VERSION => 3,
LDAP_OPT_REFERRALS => 0 );

ldap_use_domain_prefix hab ich auch mit 'true' versucht.
Hat jemand eine Idee was das verursacht, mein Gefühl sagt mir das es wahrscheinlich nur eine Kleinigkeit ist.

Grüße Marc

P.S. natürlich ist LDAP im config backend aktiviert ;-)
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: LDAP macht mit 2.6.1 Probleme

Post by Thorsten »

Hi,

das sagt doch schon die Fehlermeldung:
Invalid DN syntax
Deine DN Syntax stimmt so nicht...

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
spacewan
Posts: 24
Joined: Tue Mar 17, 2009 12:51 pm

Re: LDAP macht mit 2.6.1 Probleme

Post by spacewan »

Hi,
na meines Wissens ist die korrekt.
Wenn ich es richtig verstehe ist $PMF_LDAP["ldap_base"] = 'dc=subdomain,dc=mydomain,dc=de';
auch nur die Base DN, habs auch mit 'ou=people,dc=subdomain,dc=mydomain,dc=de' probiert,
macht aber auch keinen Unterschied. Der Admin user ist auch richtig.

Also entweder habe ich ein Brett vor dem Kopf oder es ist doch noch ein anderes Problem.
Der rest des Hauses wie Apache2/Samba authentifizierung läuft ja schließlich auch.

Grüße
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: LDAP macht mit 2.6.1 Probleme

Post by Thorsten »

Hi,

ist das LDAP Mapping in der constants_ldap.php korrekt?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
spacewan
Posts: 24
Joined: Tue Mar 17, 2009 12:51 pm

Re: LDAP macht mit 2.6.1 Probleme

Post by spacewan »

Ja, cn, uid sowie mail sind korrekte openldap Einträge unter Linux.
Was dieser Wert bedeutet weis ich allerdings nicht: LDAP_OPT_REFERRALS => 0
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: LDAP macht mit 2.6.1 Probleme

Post by Thorsten »

Hi,

evtl musst du noch die UID an den DN anhängen...? Mein LDAP-Wissen ist leider sehr begrenzt...

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
spacewan
Posts: 24
Joined: Tue Mar 17, 2009 12:51 pm

Re: LDAP macht mit 2.6.1 Probleme

Post by spacewan »

Was bzw. wie meinst du das mit UID an den DN hängen?
Ich habe kein Plan von PHP, somit stecke ich beim "code checken" auf dem Schlauch :-)

Grüße
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: LDAP macht mit 2.6.1 Probleme

Post by Thorsten »

Hi,

in der config/ldap.php

Code: Select all

$PMF_LDAP["ldap_base"] = 'dc=subdomain,dc=mydomain,dc=de';
in

Code: Select all

$PMF_LDAP["ldap_base"] = uid=admin,'dc=subdomain,dc=mydomain,dc=de';
ändern.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
spacewan
Posts: 24
Joined: Tue Mar 17, 2009 12:51 pm

Re: LDAP macht mit 2.6.1 Probleme

Post by spacewan »

Hi,
ne bringt auch nichts, nur neue Fehler:
phpMyFAQ warning [2]: ldap_search() [function.ldap-search]: Search: No such object in Ldap.php on line 167
phpMyFAQ warning [2]: ldap_first_entry(): supplied argument is not a valid ldap result resource in Ldap.php on line 174
phpMyFAQ warning [2]: ldap_get_values(): supplied argument is not a valid ldap result entry resource in Ldap.php on line 181

Grüße
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: LDAP macht mit 2.6.1 Probleme

Post by Thorsten »

Hi,

sorry, ich hatte mich vertippt:

Code: Select all

$PMF_LDAP["ldap_base"] = 'uid=admin,dc=subdomain,dc=mydomain,dc=de';
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
spacewan
Posts: 24
Joined: Tue Mar 17, 2009 12:51 pm

Re: LDAP macht mit 2.6.1 Probleme

Post by spacewan »

hatte ich eh schon so gemacht ;)
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: LDAP macht mit 2.6.1 Probleme

Post by Thorsten »

Hi,

hast du sowas wie phpLdapAdmin?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
spacewan
Posts: 24
Joined: Tue Mar 17, 2009 12:51 pm

Re: LDAP macht mit 2.6.1 Probleme

Post by spacewan »

Ja, ich setze LAM ein
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: LDAP macht mit 2.6.1 Probleme

Post by Thorsten »

Hi,

ich hab noch mal mit einem Kollegen drüber diskutiert und der meinte, dein DN kann nicht korrekt sein...

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
spacewan
Posts: 24
Joined: Tue Mar 17, 2009 12:51 pm

Re: LDAP macht mit 2.6.1 Probleme

Post by spacewan »

Ja ok, aber wie sollte die denn sonst aussehen???
Also klar heisst mein LDAP nicht "dc=subdomain,dc=mydomain,dc=de" - wollte ich im Web nicht posten,
aber die Struktur ist so. Es geht ja hier um die Base DN, klar gibt es dann als Unterestruktur noch:
ou=people
ou=machines usw.

Also wenn er meint das es falsch ist, reden wir entweder aneinander vorbei weil ich die Aussage falsch verstehe
oder sonst ein Grund.
Ich kann alledings nicht sagen wie so ein "String" bei ADS aussieht - ich setze ausschließlich Linux hier ein.

Grüße
Post Reply