473,406 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

multiple auth provider in htaccess

I would like to set up a .htaccess file so that visitors are first authenticated by LDAP, but if their login name is not in the LDAP directory, they are then authenticated against a .htpasswd file. I have both LDAP and .htaccess working; I just haven't found out how to combine these for the same site (if it's even possible).

Any help would be appreciated!
Sep 10 '10 #1
1 3094
I found the answer myself. :-)

It turns out you can include both methods on the AuthBasicProvider line, as in:

AuthType Basic
AuthLDAPAuthoritative off
AuthBasicProvider ldap, file
require valid-user

followed by the appropriate AuthUserFile and AuthLDAP* lines.

It checks LDAP first. If the login name is in LDAP, LDAP performs the authentication. If auth fails, the file is -not- consulted.

If the login name is not in LDAP, then authentication is performed against the file.
Sep 10 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Steven Stern | last post by:
I'm looking for a way to force basic http autentication from within a PHP script. Here's the situation: I have an exisiting system that first authenticates people via the aMemberPro package....
1
by: deko | last post by:
Can I use PHP and htaccess to authenticate users? My service provider lets me password protect directories on my web site - using htaccess. If a user tries to access a page within a password...
13
by: Bob Bedford | last post by:
I've protected a directory with an .htaccess file. I'd like some of the files in this directory to be accessible by a scheduler that runs an "URL". The problem is that the scheduler runs scripts...
4
by: Andy Jacobs | last post by:
Hi all Just wondering if this is possible: I want to use htaccess to authenticate different users. What I would then like to do is use the username from the htaccess box to set the session id...
4
by: psk79 | last post by:
Hi all, I created a set of pages with PHP for login using a database. Now, I need to link to a lot of CGI programs in a folder with protected-access (.htaccess). The username and password are...
0
by: Jörg Braun | last post by:
Hello NG, i have a problem With WebRequest! i want to download a htaccess saved file over a proxyconnetion with authentication. Download a file what is not saved with htaccess is no problem,...
2
by: Josselin | last post by:
If I don't want to implement a login page, but only .htaccess security control from Apache server... is there any way to get the id/pwd data in a php script to redirect the identified guy into his...
4
by: =?Utf-8?B?Q2hyaXMgQ2Fw?= | last post by:
I have been having some trouble with implementing a custom Membership Provider. We have a custom data store and business logic that pulls user information. I need some level of functionality...
2
by: Steve | last post by:
I'm looking for feedback on an authentication solution we are considering for an ASP.NET 2.0 project. The site will be accessed by both internal users who are logged into the Windows domain, and...
8
by: Geoff Cox | last post by:
Hello, Using .htaccess and a linux server is it possible to give group access to a person so that he/she can access files in several different folders? If yes, how is this done?! Cheers
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.