# Apache, LDAP authentication help



## fred974 (Apr 4, 2013)

Hello everyone,

I'm trying to get my web server to authenticate against Windows 2008 LDAP server but without any luck. I have an application that run*s* on an application server. *T*he two way*s* of using it is via a Windows executable or via the web.

If *I* set a web server running Windows with IIS, everything work*s* very well with SSO. However, *I* cannot get Apache to automatically log me in. SO far *I* tried apache mod_auth but without any luck.

Can any one help me? I know I'm not really clear but don't know what else to add.

Thank you all in advance

Fred

httpd.conf

```
<VirtualHost *:80>
DocumentRoot /var/www/html/kerbtest
ServerName gsdcodasso12.corp.u4agr.com
DirectoryIndex index.php
ServerSignature On
#SSLEngine on
#SSLProtocol all -SSLv2
#SSLCertificateFile /etc/httpd/conf/sslcrt/server.crt
#SSLCertificateKeyFile /etc/httpd/conf/sslcrt/server .key
<Directory /var/www/html/kerbtest>
Options Indexes FollowSymLinks MultiViews
Order allow,deny
Allow from all
</Directory>
<Location â€œ/â€>
AuthType Basic
AuthName gsdv12unix
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPBindDN â€œcn=test_apache,cn=Users,dc=linuxnix,dc=comâ€
AuthLDAPBindPassword UV4Ziu6v
AuthLDAPURL â€œldap://dc.linuxnix.com:3268/dc=linuxnix,dc=com?sAMAccountName?sub?(objectClass=*)â€
Require valid-users
</Location>
</VirtualHost>
```

I don't even get a prompt for a username and password


----------



## SirDice (Apr 4, 2013)

Did you load the mod_ldap and/or mod_authnz_ldap modules?

This link might have some suggestions: http://twiki.org/cgi-bin/view/Support/AuthenticationWithApacheAndLDAP


----------



## fred974 (Apr 5, 2013)

Once again, thank you for the pointer, @SirDice 

I have none of the above loaded. I'll do that and post an update*.*


----------



## fred974 (Apr 5, 2013)

*N*o change. I also looked at the link above and they use .htaccess. I would like to use the krb5.keytab file that *I* already use on my app server.


----------



## fred974 (Apr 9, 2013)

*RESOLVED*

Dear all,

This is an update to let you know that *I* managed to get my Tomcat application to authenticate successfully via my web browser using mod_aut_ntln_winbind.

The guide *I* used is: 
http://labnotes.decampo.org/2013/02/trac-on-centos-63-part-3.html

The guide was written for centOS but there is very little to change to adapt it to Free*BSD*

Hope this post will help other members.


----------

