Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to access some files hosted on a SMB share through httpd using LDAP. I'm using CentOS release 5.8 (Final), Apache/2.2.3 Prefork with mod_authnz_ldap module enabled. The LDAP authentication and authorization works for my user and for the share I want to access.

So I wanted to access the files on that share, so I created a virtualhost named public and I put the correspondent line in my hosts file in order to point 'public' to the ip of our server (caravaggio), which hosts LDAP and Samba

LDAP on caravaggio was configured this way:

base dc=mybusiness,dc=intranet
uri ldap://caravaggio
nss_initgroups_ignoreusers root,ldap
ssl no
tls_cacertdir /etc/openldap/cacerts
pam_password crypt

nss_base_group ou=Groups,dc=mybusiness,dc=intranet?one
nss_base_passwd ou=Users,dc=mybusiness,dc=intranet?one

And the configuration for the virtualhost I'm trying to configure follows:

<VirtualHost *:80>
   ServerName public
   ServerAlias public.mybusiness.intranet
   DocumentRoot "/shares/public/"
   <Location />
        AuthName "MyBusiness Public"
        AuthType Basic
        AuthLDAPBindDN ou=Groups,ou=Users,dc=mybusiness,dc=intranet
        AuthLDAPURL ldap://caravaggio:389/ou=Groups,ou=Users,dc=mybusiness,dc=intranet
        AuthBasicProvider ldap
        AuthzLDAPAuthoritative Off
        Require valid-user


So I did an /etc/init.d/httpd reload and httpd told me it was ok.

But, when I point the browser to public/, browser shows me the authentication window, I put the credentials, but it fails. /var/log/httpd/error_log shows me this:

[Tue Jun 11 15:39:31 2013] [warn] [client] [7999] auth_ldap authenticate: user lucas.bracher authentication failed; URI / [LDAP: ldap_simple_bind_s() failed][Server is unwilling to perform]
[Tue Jun 11 15:39:31 2013] [error] [client] (13)Permission denied: access to /favicon.ico denied

So, could someone give me some light on how I can solve it? Maybe the problem is I put name resolving info on hosts file?

Thank you!

Lucas Bracher.

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.