Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Configuration of Apache with LDAP on Widows 2003

Posted on 2008-06-18
6
Medium Priority
?
644 Views
Last Modified: 2008-06-22
Hi,

   I want to configure the Apache 2.2.8 with MS LDAP and then will configure Subvesion 1.4.6 on Windows 2003 Platform.
I read the documention over the web but most of it is for Unix/Linux platform.  

Can you please provide the detailed configuration of Apache with LDAP. I have installed the Apache 2.2.8 on Windows 2003 and following actions are done.

Following are the entries in httpd.conf file for Apache.
1.LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
2. LoadModule ldap_module modules/mod_ldap.so
3. Add the following

<Directory "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs">
AuthType Basic
AuthName Internal
AuthBasicAuthoritative off
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPURL "ldap://ldap.domain.com:389/ou=LDAP Users & Groups,dc=domain,dc=com"
Require valid-user
AuthLDAPBindDN "ou=LDAP Users & Groups,dc=domain,dc=com"            
</Directory>

When I try to login to the Apache Server I am not getting authenticated by the LDAP Server and I found the following errors in the Apache Server's log file.

[Wed Jun 18 00:13:19 2008] [warn] [client localhost] [3588] auth_ldap authenticate: user myname authentication failed; URI / [ldap_search_ext_s() for user failed][Operations Error]

Where as the user 'myname' exists in the LDAP.
0
Comment
Question by:Naveed27c
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 57

Expert Comment

by:giltjr
ID: 21816660
Typically you must use a authorized ID to connect to the LDAP server to even validate a user.  I don't think that AD allows for anonymous LDAP queries to validate user.

Which means you will need to specify a valid user-id and password on the "AuthLDAPBindDN" statement.
0
 

Author Comment

by:Naveed27c
ID: 21819505
Hi giltjr,  

   Thanks for your comments. I hope you can help me on this issue. There is some entry which I am not entering correctly.  I need you help to put the entried for all the required parameters for LDAP configurations.

     The user in LDAP is 'tester' and his password is 'a1234'. This user is created under a orgnizationalunit OU called 'Users'.    DC=domain,DC=com .  In LDAP the objectClass entries for usre 'tester' are 'top' and 'person'.  I have already defined all the configuration in my post. Now in Apache httpd.conf file I have enter the following entries, Please correct me on this and also if you need any more info let me know. I really need this to work and stuck on this for whole one week. Also let me know if any permission issues are there.

This is on Windows.

<Directory "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs">
AuthType Basic
AuthName Internal
AuthBasicAuthoritative off
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPURL "ldap://192.168.1.101:389/ou=Users,dc=domain,dc=com"
Require valid-user
AuthLDAPBindDN "cn='tester',ou=Users,dc=domain,dc=com"            
</Directory>

But still getting same error. I dont know how to specify a valid user-id and password on the "AuthLDAPBindDN" statement.

Can you please send me a example configuration which is working and their corresponding entries in LDAP server so I can follow the same steps to setup this.

Thanks Guru
Naveed
0
 
LVL 57

Accepted Solution

by:
giltjr earned 2000 total points
ID: 21820985
Here is a guide to help you.  Basically you need something like:


AuthLDAPURL "ldap://192.168.1.101:389/ou=Users,dc=domain,dc=com?sAMAccountName?sub?(objectClass=*)"
AuthLDAPBindDN "cn=tester,cn=Users,dc=domain,dc=com"  
AuthLDAPBindPassword a1234
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Author Comment

by:Naveed27c
ID: 21828854
Thanks giltjr it worked for user tester after binding the password.

Now if there are 300 users in LDAP in OU 'Users' then how do I authenticate them. I mean to say that now how  a common user part of my domain 'domain' get authenticated.

Thanks
Naveed


0
 

Author Comment

by:Naveed27c
ID: 21833745
Thanks again giltjr, every thing is working now. Great help.

Best Regards
Naveed
0
 
LVL 57

Expert Comment

by:giltjr
ID: 21841752
Glad to see you have it working.  I was out of town and did not have access to the Internet.  To give a basic explanation of why it is working.

The way things normally use LDAP for authentication is they connect to the LDAP server either anonymously or with a "common" user-id.  Then they do a "look-up" for the user you are attempting to verify.  If that user-id exists, then they verify the password.

This is why once you got the correct user-id/password to connect to the LDAP server, everything worked.  If you had users in a OU other than Users, then it gets a bit more complicated.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question