Booked Scheduler Community Support
December 09, 2019, 04:38:12 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Can't get LDAP to work  (Read 493 times)
psnizek
Newbie
*

Karma: 0
Posts: 3


« on: May 09, 2019, 07:02:04 AM »

Hi

I'm trying to get LDAP authentication to work. All pointers to help me solve this question are very welcome.

This is the log:

2019-05-09T12:33:28+02:00 [5981] ERROR default - [User=  ()] Searching ldap for user username [File=/var/www/booked-2.7.6/plugins/Authentication/Ldap/Ldap2Wrapper.php,Line=140]
2019-05-09T12:33:28+02:00 [5981] DEBUG default - [User=  ()] Search Result count: 1 [File=/var/www/booked-2.7.6/plugins/Authentication/Ldap/Ldap2Wrapper.php,Line=150]
2019-05-09T12:33:28+02:00 [5981] ERROR default - [User=  ()] Found user username [File=/var/www/booked-2.7.6/plugins/Authentication/Ldap/Ldap2Wrapper.php,Line=169]
2019-05-09T12:33:28+02:00 [5981] DEBUG default - [User=  ()] Trying to authenticate user username against ldap with dn uid=username,ou=aaaa,ou=bbb,ou=ccc,ou=ddd,dc=ee [File=/var/www/booked-2.7.6/plugins/Authentication/Ldap/Ldap2Wrapper.php,Line=82]
2019-05-09T12:33:28+02:00 [5981] DEBUG default - [User=  ()] Authentication was successful [File=/var/www/booked-2.7.6/plugins/Authentication/Ldap/Ldap2Wrapper.php,Line=87]
2019-05-09T12:33:28+02:00 [5981] ERROR default - [User=  ()] LDAP - uid attribute: uid [File=/var/www/booked-2.7.6/plugins/Authentication/Ldap/Ldap2Wrapper.php,Line=113]
2019-05-09T12:33:28+02:00 [5981] ERROR default - [User=  ()] LDAP - Loading user attributes: sn, givenname, mail, telephonenumber, physicaldeliveryofficename, title [File=/var/www/booked-2.7.6/plugins/Authentication/Ldap/Ldap2Wrapper.php,Line=136]
2019-05-09T12:33:28+02:00 [5981] ERROR default - [User=  ()] Searching ldap for user username [File=/var/www/booked-2.7.6/plugins/Authentication/Ldap/Ldap2Wrapper.php,Line=140]
2019-05-09T12:33:28+02:00 [5981] ERROR default - [User=  ()] Could not find user username [File=/var/www/booked-2.7.6/plugins/Authentication/Ldap/Ldap2Wrapper.php,Line=196]
2019-05-09T12:33:28+02:00 [5981] DEBUG default - [User=  ()] Trying to log in as: username [File=/var/www/booked-2.7.6/lib/Application/Authentication/Authentication.php,Line=95]
2019-05-09T12:33:28+02:00 [5981] DEBUG default - [User=  ()] User: username was validated: 0 [File=/var/www/booked-2.7.6/lib/Application/Authentication/Authentication.php,Line=115]

We can see that "Authentication was successful". A bit later 'username' could not be found. I could not find out why.

This is what the schema of one LDAP entry looks like:

dn: uid=username,ou=aaaa,ou=bbb,ou=ccc,dc=ddd,dc=ee
uzhuuid: anumber
groupMember: something
groupMember: something else
givenName: user's given name
sn: user's surname
objectClass: pppp
objectClass: qqqq
objectClass: top
uid: user shortname
title: title of person
cn: user shortname
mail: email.add.of.user@ddd.ee


this is my (simple) configuration:

$conf['settings']['host'] = 'auth.ddd.ee';
$conf['settings']['port'] = '636';
$conf['settings']['version'] = '3';
$conf['settings']['starttls'] = 'false';
$conf['settings']['binddn'] = 'cn=xxxx,ou=ppp,ou=ccc,dc=ddd,dc=ee';
$conf['settings']['bindpw'] = 'password';
$conf['settings']['basedn'] = 'ou=bbb,ou=ccc,dc=ddd,dc=ee';
$conf['settings']['filter'] = '';
$conf['settings']['scope'] = '';
$conf['settings']['required.group'] = '';
$conf['settings']['database.auth.when.ldap.user.not.found'] = 'true';
$conf['settings']['ldap.debug.enabled'] = 'true';
$conf['settings']['attribute.mapping'] = 'sn=sn,givenname=givenname,mail=mail,title=title';
$conf['settings']['user.id.attribute'] = 'uid';
$conf['settings']['sync.groups'] = 'false';
$conf['settings']['prevent.clean.username'] = 'false';

thank you
Philipp
Logged
psnizek
Newbie
*

Karma: 0
Posts: 3


« Reply #1 on: May 10, 2019, 04:49:08 AM »

sorry, forgot to mention the version of booked: 2.7.6 on ubuntu 16 LTS.
Logged
psnizek
Newbie
*

Karma: 0
Posts: 3


« Reply #2 on: May 31, 2019, 04:39:43 AM »

Hey devs

it's a bit lame not to answer. Especially under the circumstance that you use PHP7-incompatible Net_LDAP2 version 2.1.0 in your latest booked version. You haven't even bothered yet to upgrade to version 2.2.0, or, even better, switch to an LDAP module that is actually maintained!

Have a good day!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!