LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache Active Directory authentication (https://www.linuxquestions.org/questions/linux-newbie-8/apache-active-directory-authentication-833735/)

BFCsaus 09-22-2010 04:20 AM

Apache Active Directory authentication
 
Hi,

I have an old Apache version (1.3.11) and an old Redhat release (2.1.12-20 - Cartman)and need to authenticate a Windows 2003 domain. The authentication to an NT domain already works as expected (see below) but unfortunately I am unable to find the correct LDAP module for V1.3.11 to allow authentication.

Auth_SMB on
Auth_SMB_Authoritative on
Auth_SMB_Server <server>
Auth_SMB_Domain <Domain>
require valid user

From what I have read the LDAP module needs to be compiled with Apache but I am really not sure. Unfortunately I am unable to upgrade to Apache2 when I could presumibly use the authnz_ldap_module but if someone could point me to the correct LDAP module for 1.3.11 it would be appreciated.

Ive installed openldap-1.2.9-6 and openldap-devel-1.2.9-6 but don't particulary want to go down configuring LDAP when hopefully I can simply add the LDAP module to Apache which was not compiled in Apache initially.

Also, do I need to specifiy the AD domain password in the directives or can the Windows lads just create any account I can use.



Thanks in advance.

quanta 09-22-2010 04:29 AM

AFAIK, you must upgrade to Apache 2:
Quote:

mod_authz_ldap now only works with Apache HTTPD 2.2. Apache 1.3 is no longer supported.

BFCsaus 09-22-2010 05:05 AM

Thanks Quanta, appreciate the ideal way forward would be to upgrade to 2.2 but unfortunately at the moment I am unable to do so .

Im still trawling through google trying to find the best way forward although im still struggling trying to find the correct method/module to authenticate V1.3 with Active Directory...

BFCsaus 09-22-2010 10:59 AM

Im now trying to configure local authentication and have performed the following:

# mkdir /usr/local/apache/password
# htpasswd -c /usr/local/apache/password/password user1
password etc

Then added the following to the httpd.conf above the NT authentication


AuthUserFile /usr/local/apache/password/password
#
Auth_SMB on
Auth_SMB_Authoritative on
Auth_SMB_Server <server>
Auth_SMB_Domain <Domain>
require valid user

Restarted apache but am not able to logon using the local http password. Ive also created a .htaccess file in the directory but still no luck..

Any ideas please..??..

BFCsaus 09-23-2010 10:41 AM

Still not sorted this out but have another problem now which is even more perplexing...

In the httpd.conf file I have a simple Directive as follows:

<Location /test>
AuthName "This is a test"
Auth Type Basic
AuthUserFile /usr/local/apache/.htpassword
Require valid-user
</Location>


Ive created the .htpassword file whichi looks ok but when I try to access /test it gives me the prompt but for some reason rejects the password and shows a 401 error in the logs.

When I change the above to

<Directory /test>
AuthName "This is a test"
Auth Type Basic
AuthUserFile /usr/local/apache/.htpassword
Require valid-user
</Directory>


I can access the web page but with NO user/password prompt.

Read the documentation regarding the difference between <Location> and <Directory> but still can't figure out what im doing wrong, it must be something and nothing so any help would be greatly appreciated before I go mad!!!!



Thanks...

Not exactly sure whats going on but but everything looks ok

quanta 09-23-2010 10:54 PM

There is no space between Auth and Type. You should check the configuration file with 'httpd -t' or 'apachectl configtest' before restarting.

BFCsaus 09-24-2010 09:57 AM

Thanks quanta, this was a typo as I can't cut/paste from the server itself so the AuthType was without spaces.

Ive now decided to temporarily create the user in the NT domain and continue looking round for the best way to authenticate via AD but panic over as they say...


All times are GMT -5. The time now is 05:07 PM.