Hi Joost,
On 16 Sep 2016, at 10:25 AM, Joost Hillen <
hillen...@gmail.com> wrote:
> Good day one and all,
>
> I've setup a simplesamlphp system inside a network with a server 2008 r2 active directory server.
> I can connect to LDAP / retrieve results using ldapsearch
>
> ldapsearch -h
exampleserver.internal.customer.net -V -b "OU=Users,OU=Domain,DC=intern,DC=domain,DC=net" -D "ldapbind" -w "password"
>
> However, when I input those variables into /etc/simplesamlphp/authsources.php (see below), I get the following error message when trying to authenticate.
What does “trying to authenticate” means here? You are testing the authsource in the web interface, and then typing the username and password? In that case, what username, and what password?
“priv.username” and “priv.password” are NOT the username and password of the user you want to authenticate (obviously). Those options are intended to provide an account that you can use to bind with higher privileges than the user, so that you can retrieve attributes that the user him/herself cannot access.
> Error in authenticationsource 'ldap'. As reason was provided: 'Library - LDAP search(): Failed search on base \'OU=Users,OU=Domain,DC=intern,DC=domain,DC=net\' for \'(|(samAccountName=ldapbind))\'; cause: \'Operations error\' (0x1); additional: \'000004DC: LdapErr: DSID-0C0906E8, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v1db1\''.
>
>
> 'customer-ldap' => array(
> 'ldap:LDAP',
> 'hostname' => '
exampleserver.internal.customer.net',
> 'enable_tls' => FALSE,
> 'attributes' => NULL,
> 'debug' => TRUE,
> 'timeout' => 30,
> 'referrals' => FALSE,
> 'attributes' => NULL,
> 'search.enable' => TRUE,
> 'search.base' => 'OU=Users,OU=Domain,DC=intern,DC=domain,DC=net',
> 'search.attributes' => array('samAccountName'),
> 'priv.read' => TRUE,
> 'priv.username' => 'ldapbind',
> 'priv.password' => 'password',
>
> As ldapsearch works without problems, and I have provided the user to bind against (priv.username), I can't figure out what I am doing wrong.
>
> If someone would be able to give a hint, point me in the right direction, I'd be most grateful.
>
> Kind regards,
>
> Joost Hillen
--
Jaime Pérez
UNINETT / Feide
jaime...@uninett.no
jaime...@protonmail.com
9A08 EA20 E062 70B4 616B 43E3 562A FE3A 6293 62C2
"Two roads diverged in a wood, and I, I took the one less traveled by, and that has made all the difference."
- Robert Frost