Help with debugging Authentication ActiveDiretory

Community Support for Booked Scheduler
Post Reply
kb-always
Posts: 12
Joined: Thu Aug 27, 2020 1:12 pm

Help with debugging Authentication ActiveDiretory

Post by kb-always »

Hi trying to setup active directory auth

Is there log that cant confirm that my setup it working or in the debug log i only see this

2020-08-27T15:17:21+02:00 [3156] DEBUG default - [User= ()] User: testuser, was validated: 0 [File=C:\server\www\booked\lib\Application\Authentication\Authentication.php,Line=120]

kb-always
Posts: 12
Joined: Thu Aug 27, 2020 1:12 pm

Re: Help with debugging Authentication ActiveDiretory

Post by kb-always »

got the plugin activated and now i get this

2020-09-28T09:05:21+00:00 [17295] DEBUG default - [User= ()] Loading plugin. Type=Authentication, Plugin=ActiveDirectory [File=/var/www/html/booked/lib/Common/PluginManager.php,Line=209]
2020-09-28T09:05:27+00:00 [17337] DEBUG default - [User= ()] Loading plugin. Type=Authentication, Plugin=ActiveDirectory [File=/var/www/html/booked/lib/Common/PluginManager.php,Line=209]
2020-09-28T09:05:27+00:00 [17337] DEBUG default - [User= ()] ActiveDirectory - Trying to connect to host server.local.test [File=/var/www/html/booked/plugins/Authentication/ActiveDirectory/AdLdapWrapper.php,Line=55]
2020-09-28T09:05:27+00:00 [17337] DEBUG default - [User= ()] ActiveDirectory - Connection succeeded to host server.local.test [File=/var/www/html/booked/plugins/Authentication/ActiveDirectory/AdLdapWrapper.php,Line=63]
2020-09-28T09:05:27+00:00 [17337] DEBUG default - [User= ()] ActiveDirectory - Authenticate for user testuser failed with reason Can't contact LDAP server [File=/var/www/html/booked/plugins/Authentication/ActiveDirectory/AdLdapWrapper.php,Line=86]
2020-09-28T09:05:27+00:00 [17337] DEBUG default - [User= ()] Result of ActiveDirectory LDAP Authenticate for user testuser: 0 [File=/var/www/html/booked/plugins/Authentication/ActiveDirectory/ActiveDirectory.php,Line=113]
2020-09-28T09:05:27+00:00 [17337] DEBUG default - [User= ()] Trying to log in as: testuser [File=/var/www/html/booked/lib/Application/Authentication/Authentication.php,Line=100]
2020-09-28T09:05:27+00:00 [17337] DEBUG default - [User= ()] User: testuser , was validated: 0 [File=/var/www/html/booked/lib/Application/Authentication/Authentication.php,Line=120]

The user you can give ind the config will a domain user do or?

kb-always
Posts: 12
Joined: Thu Aug 27, 2020 1:12 pm

Re: Help with debugging Authentication ActiveDiretory

Post by kb-always »

testet ldap and it work with the php code from
http://www.abrandao.com/2018/08/php-aut ... directory/

kb-always
Posts: 12
Joined: Thu Aug 27, 2020 1:12 pm

Re: Help with debugging Authentication ActiveDiretory

Post by kb-always »

DEBUG default - [User= ()] ActiveDirectory - Authenticate for user testuser failed with reason Can't contact LDAP server [File=/var/www/html/booked/plugins/Authentication/ActiveDirectory/AdLdapWrapper.php,Line=86]

why do i get this ?? do i need to fil out

$conf['settings']['username'] = '';
$conf['settings']['password'] = '';
in
ActiveDirectory.config.php

kb-always
Posts: 12
Joined: Thu Aug 27, 2020 1:12 pm

Re: Help with debugging Authentication ActiveDiretory

Post by kb-always »

got a little further

now i have this

2020-09-28T09:44:58+00:00 [17337] DEBUG default - [User= ()] ActiveDirectory - Authenticate for user lontru failed because user was not in the required groups [File=/var/www/html/booked/plugins/Authentication/ActiveDirectory/AdLdapWrapper.php,Line=117]


$conf['settings']['required.groups'] = '"Domain Users"';

does this group not work?

gbottaro
Posts: 7
Joined: Thu Oct 01, 2020 12:53 am

Re: Help with debugging Authentication ActiveDiretory

Post by gbottaro »

This worked form me:
<<<<<<<ActiveDirectory.config.php>>>>>>>>
$conf['settings']['domain.controllers'] = 'mydomaincontroller.mydomain';
$conf['settings']['port'] = '389';
$conf['settings']['username'] = your_ADuser';
$conf['settings']['password'] = 'your_ADpassword';
$conf['settings']['basedn'] = 'OU=BLABLABLA,DC=BLABLA,DC=BLABLA';
$conf['settings']['version'] = '3';
$conf['settings']['use.ssl'] = 'false';
$conf['settings']['account.suffix'] = '@mydomain';
$conf['settings']['database.auth.when.ldap.user.not.found'] = 'false';
$conf['settings']['attribute.mapping'] = 'sn=sn,givenname=givenname,mail=mail,telephonenumber=telephonenumber,physicaldeliveryofficename=physicaldeliveryofficename,title=titl
e';
$conf['settings']['required.groups'] = '';
$conf['settings']['sync.groups'] = 'false';
$conf['settings']['use.sso'] = 'true';
$conf['settings']['prevent.clean.username'] = 'false';

<<<<<<<config.php>>>>>>>>
$conf['settings']['plugins']['Authentication'] = 'ActiveDirectory';

kb-always
Posts: 12
Joined: Thu Aug 27, 2020 1:12 pm

Re: Help with debugging Authentication ActiveDiretory

Post by kb-always »

thanks got it to work have misconfigured it

was using $conf['settings']['use.ssl'] = 'true';

with $conf['settings']['port'] = '389';

så after I sat it to false it worked.

kb-always
Posts: 12
Joined: Thu Aug 27, 2020 1:12 pm

Re: Help with debugging Authentication ActiveDiretory

Post by kb-always »

thanks got it to work have misconfigured it

was using $conf['settings']['use.ssl'] = 'true';

with $conf['settings']['port'] = '389';

så after I sat it to false it worked.

Post Reply