+ Post New Thread
Results 1 to 5 of 5
How do you do....it? Thread, Apache2 & LDAP in Technical; Hi, I've been pulling my hair out over this for a few days now, i'm trying to get apache to ...
  1. #1

    Join Date
    Oct 2007
    Posts
    10
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Apache2 & LDAP

    Hi,

    I've been pulling my hair out over this for a few days now, i'm trying to get apache to authorize a user based on their AD credentials. I've got mod_auth_ldap install and working as far as I can tell I just can't seem to get the .htaccess file working.

    My current code is:
    Code:
    Order deny,allow
    Deny from All
    AuthName "Intranet"
    AuthType Basic
    AuthBasicProvider ldap
    AuthzLDAPAuthoritative off
    AuthLDAPBindDN "cn=LDAPUser,cn=Users,dc=internal,dc=distortedlogic,dc=net"
    AuthLDAPBindPassword PASSWORD
    AuthLDAPURL ldap://localhost:389/dc=internal,dc=distortedlogic,dc=net?sAMAccountName?sub?(objectClass=*)
    Require valid-user
    Satisfy any
    When visit the protected page I get the login prompt but get no further. I've tried a mix of things i've found online and have managed to generate every error message under the sun. I've also tried various logins ranging from DOMAIN\Username to Username@domain but to no avail.

    Incase it helps, my users are stored in the Users container under the root of the domain.

    I'm sure that LDAP is working properly because i'm able to get PHP to authenticate against it perfectly fine.

    Any help would be greatly appreciated.

    Regards

  2. #2
    RichardDS's Avatar
    Join Date
    May 2007
    Location
    Brighton, UK
    Posts
    13
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Apache2 & LDAP

    Can't see where you are going wrong but here is my conf I use to protect subversion:

    Code:
        <Directory />
         Options FollowSymLinks
         Order allow,deny
         Allow from all
    
         AuthLDAPAuthoritative on
         AuthType Basic
         AuthName "CNCS Domain Subversion Access"
         AuthLDAPBindDN "CN=Apache LDAP,OU=Service Accounts,DC=cncs,DC=co,DC=uk"
         AuthLDAPBindPassword <password>
         AuthLDAPURL "ldap://skoda.cncs.co.uk:389/OU=Users,OU=Administrators,DC=cncs,DC=co,DC=uk?sAMAccountName?sub?(objectClass=*)"
        </Directory>

  3. #3

    Join Date
    Oct 2007
    Posts
    10
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Apache2 & LDAP

    Thanks richard, I'll try adding it to httpd.conf as opposed to a .htaccess file shortly and let you know how it goes.

    Regards

  4. #4

    Join Date
    Oct 2007
    Posts
    10
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Apache2 & LDAP

    Hi,

    I've tried everything I can think of including installing a different windows apache server, i've gone from wamp to XAMPP.

    I still cant get the damn authentication to work. I've tried several different users with varying permissions in the bind string and loads of users in the actual login. The error im currently getting is:

    [Mon Nov 05 23:02:23 2007] [warn] [client 86.20.154.122] [2944] auth_ldap authenticate: user nath authentication failed; URI /test/ [LDAP: ldap_simple_bind_s() failed][Invalid Credentials]
    [Mon Nov 05 23:02:23 2007] [error] [client 86.20.154.122] user nath: authentication failure for "/test/": Password Mismatch

    however I know that the credentials work.

  5. #5

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Apache2 & LDAP

    Code:
    AuthLDAPBindDN "CN=Apache LDAP,OU=Service Accounts,DC=cncs,DC=co,DC=uk"
    should be
    Code:
    AuthLDAPBindDN "Apache LDAP@Service Accounts.cncs.co.uk"
    I'm dubious about the spaces though. If you still have problems, Try removing them.

SHARE:
+ Post New Thread

Similar Threads

  1. phpESP and LDAP
    By brubakes in forum Educational Software
    Replies: 0
    Last Post: 3rd January 2008, 08:55 PM
  2. Apache2 SSL
    By Jackd in forum *nix
    Replies: 12
    Last Post: 5th December 2007, 01:15 PM
  3. PHP and LDAP on IIS
    By srochford in forum Windows
    Replies: 2
    Last Post: 31st October 2007, 09:05 AM
  4. LDAP & SchoolGuardian
    By dave.81 in forum *nix
    Replies: 2
    Last Post: 14th September 2007, 09:20 AM
  5. ldap on php
    By browolf in forum Web Development
    Replies: 11
    Last Post: 8th May 2007, 09:33 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •