access apache via ldap and local password

I'm trying to setup apache to be accessed to users on a windows ldap server and local users on the unix host. I have configured a /localtion combining LDAP and local authentication, but it does not work. Only LDAP user can access the /location. Local user fails:

[Wed Aug 19 18:24:10 2015] [error] [client 192.168.174.31] user localuser not found: /svnweb

Open in new window


Here is the /localtion configuration:

# Repositorio SVNWEB
    <Location /svnweb>
      Dav svn
      SVNPath /REPOS/SVNWEB/SVNWEB/
      AuthType Basic
      AuthBasicProvider ldap
      AuthzLDAPAuthoritative on
      AuthLDAPBindDN "userldap_bind@domain"
      AuthLDAPBindPassword "password"
      AuthLDAPURL "ldap://domain.net:3268/?sAMAccountName?sub?"
      Require ldap-user user_domain_ldap
      AuthName "SVN -- SVNWEB"
      AuthUserFile "/opt/freeware/etc/httpd/conf/passwords_SVN/file_passwd_local_users"
      require valid-user
      Allow from 172.1.1.1
      </Location>

Open in new window


Is possible to setup a /localtion on apache for LDAP and local password file authentication?

Is there another way to have both types of authentication?

Thanks
LVL 2
CSIA ANAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Zephyr ICTCloud ArchitectCommented:
Could this work:

# Repositorio SVNWEB
    <Location /svnweb>
      Dav svn
      SVNPath /REPOS/SVNWEB/SVNWEB/
      AuthType Basic
      AuthBasicProvider file ldap
      AuthUserFile /<path>/passwd
      AuthzLDAPAuthoritative on
      AuthLDAPBindDN "userldap_bind@domain"
      AuthLDAPBindPassword "password"
      AuthLDAPURL "ldap://domain.net:3268/?sAMAccountName?sub?"
      Require ldap-user user_domain_ldap
      AuthName "SVN -- SVNWEB"
      AuthUserFile "/opt/freeware/etc/httpd/conf/passwords_SVN/file_passwd_local_users"
      require valid-user
      Allow from 172.1.1.1
      </Location>

Open in new window


You might need to set  AuthzLDAPAuthoritative to "off" to let it fall-back ...
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CSIA ANAuthor Commented:
Hi,

I see you have twice 'AuthUserFile'

 AuthUserFile /<path>/passwd
 AuthUserFile "/opt/freeware/etc/httpd/conf/passwords_SVN/file_passwd_local_users"

Open in new window


Is it ok?
0
CSIA ANAuthor Commented:
Pefect!
Thanks
0
Zephyr ICTCloud ArchitectCommented:
Great :-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.