# impossible to auth on apache/ldap [solved]

## 22decembre

This is so hard !

I have read numerous blog posts to config my htaccess with ldap. Nothing works.

Here is the basic :

```
AuthName "Login Bib'lib admin"

AuthType Basic

AuthBasicProvider ldap

AuthLDAPURL ldap://localhost/ou=utilisateurs,dc=22decembre,dc=eu?uid

require user stephane
```

here is the debbugging log in apache :

```
[Wed Dec 28 17:20:16 2011] [debug] mod_authnz_ldap.c(1016): [26167] auth_ldap url parse: `ldap://localhost/ou=utilisateurs,dc=22decembre,dc=eu?uid', Host: localhost, Port: 389, DN: ou=utilisateurs,dc=22decembre,dc=eu, attrib: uid, scope: base, filter: (null), connection mode: not using SSL
```

The ldap works and I can log on wordpress using the stephane user (myself). What's wrong ?

----------

## Veldrin

the config looks ok. 

one side question: does your ldap server allow anonymous binds? If it does not, you have to add AuthLDAPBindDN and AuthLDAPBindPassword.

V.

----------

## 22decembre

It is suppose to work in anonymous binding.

I will look at it carefully tomorrow.

Thanks.

----------

## 22decembre

I think I have setup the ldap in a correct manner, see :

```
access to attrs="userPassword"

  by anonymous auth

  by self write

  by * none

access to *

  by self write

  by * read

  by anonymous auth

  by * search

```

So, anyone could acces to the passwords to auth ! And for exemple, I can auth along the ldap on wordpress, whereas I didn't set any root password. Am I clear ?

I can make a search from a computer in my lan on a user (ldapsearch -L stephane give the groups I belong) without typing a password...

Thanks for your help.

----------

## 22decembre

quite stupid : I need the " ...

AuthLDAPURL "ldap://localhost/ou=utilisateurs,dc=22decembre,dc=eu?uid"

solved !

----------

