LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache 2.2.4 mod_auth_xradius issue (https://www.linuxquestions.org/questions/linux-server-73/apache-2-2-4-mod_auth_xradius-issue-572533/)

Amuro-Ray2020 07-26-2007 04:23 PM

Apache 2.2.4 mod_auth_xradius issue
 
Okay, per my earlier post, I decided to try mod_auth_xradius to authenticate users on apache. I've dynamically loaded the module with apxs, and I've made sure the correct LoadModule statements are in place in httpd.conf. After that, I placed a directive at the bottom to limit access to a specific directory:

Code:

<Directory /var/www/html/CCNA1>
        AuthName "Private Area"
        AuthType basic
        AuthXRadiusAddServer "172.31.1.200:1812" "cntRADius"
        AuthXRadiusTimeout 2
        AuthXRadiusRetries 2
        require valid-user
</Directory>

Now, when I attempt to browse to a page in the CCNA1 directory, it pops up a little box asking for a username and password, just like it should. I type in a username and password, press enter, and then it brings back the same box seconds later. There is no problem with the RADIUS server as we have tested with other clients using the same username and password. Here's what I get in my httpd error_log:

Code:

[Tue Jul 24 13:01:48 2007] [error] [client 172.31.1.1] PAM: user 'cntuser' - not authenticated: Authentication failure, referer: http://172.31.1.1/index.php?option=com_content&task=view&id=69&Itemid=61
It looks to me as if for whatever reason, Apache is trying to use PAM to authenticate instead of RADIUS, unless this is what is supposed to happen and PAM sends it off to RADIUS for me. We also used wireshark to see if any UDP packets to port 1812 were being sent out from the server, but nothing was sent. Any ideas?

rwazar 08-07-2007 09:25 PM

The auth_basic module seems to be defaulting to pam in your case which seems odd because I thought the default was 'file'.
Anyhow....put this in your code as well
Code:

AuthBasicProvider xradius
The auth_basic module needs to be told to use xradius. Was having a similar issue the other day.


All times are GMT -5. The time now is 03:56 PM.