[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Apache with PAM Authentication Fallback

Asked by tuaris in Apache Web Server, FreeBSD, Web Servers

Tags: apache, pam, text file, freebsd

I have Apache 2.2.x running on FreeBSD 7.2

I currently have Apache prompting for a username and password which is read from a text file, while allowing a certain IP addresses to access a site without logging on.

I would like to retain this function, but add in the ability to have Apache fall back to the system's user accounts (through PAM) if the user does not exit in the text file.

EXAMPLE 1:
pperson is a system user
pperson is NOT in the .htpassword file
pperson is NOT in the allowed IP range
pperson can log on to the website using his FreeBSD username and password.

EXAMPLE 2:
ssomeone is a system user
ssomeone is in the .htpassword file
ssomeone is NOT in the allowed IP range
ssomeone can log on to the website using the username/password in the .htpassword file.

Below are my current Apache directives
1:
2:
3:
4:
5:
6:
7:
8:
order allow,deny
AuthType Basic
AuthName "Private Access"
AuthUserFile /usr/local/etc/apache22/.htpassword
require valid-user
deny from 192.168.0.37
allow from 192.168.0.0/16
Satisfy any
[+][-]09/05/09 05:31 AM, ID: 25265986Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/15/09 02:35 PM, ID: 25339830Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/16/09 06:06 AM, ID: 25345126Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625