Apache::AuthNetLDAP - mod_perl module that uses the Net::LDAP module for user authentication for Apache AuthName "LDAP Test Auth" AuthType Basic #only set the next two if you need to bind as a user for searching #PerlSetVar BindDN "uid=user1,ou=people,o=acme.com" #optional #PerlSetVar BindPWD "password" #optional PerlSetVar BaseDN "ou=people,o=acme.com" PerlSetVar LDAPServer ldap.acme.com PerlSetVar LDAPPort 389 #PerlSetVar UIDAttr uid PerlSetVar UIDAttr mail require valid-user PerlAuthenHandler Apache::AuthNetLDAP This module authenticates users via LDAP using the Net::LDAP module. This module is Graham Barr's "pure" Perl LDAP API. It also uses all of the same parameters as the Apache::AuthPerLDAP, but I have added two extra parameters. The parameters are: Used to set initial LDAP user. Used to set initial LDAP password. This sets the search base used when looking up a user in an LDAP server. This is the hostname of the LDAP server you wish to use. This is the port the LDAP server is listening on. The attribute used to lookup the user.

Uses for UIDAttr
For example if you set the UIDAttr to uid, then the LDAP search filter will lookup a user using the search filter: Normally you will use the uid attribute, but you may want (need) to use a different attribute depending on your LDAP server or to synchronize with different applications. For example some versions of Novell's LDAP servers that I've encountered stored the user's login name in the cn attribute (a really bad idea). And the Netscape Address Book uses a user's email address as the login id. It's a pretty straightforward install if you already have mod_perl and Net::LDAP already installed. After you have unpacked the distribution type: perl Makefile.PL make make install Then in your httpd.conf file or .htaccess file, in either a <Directory> or <Location> section put: AuthName "LDAP Test Auth" AuthType Basic #only set the next two if you need to bind as a user for searching #PerlSetVar BindDN "uid=user1,ou=people,o=acme.com" #optional #PerlSetVar BindPWD "password" #optional PerlSetVar BaseDN "ou=people,o=acme.com" PerlSetVar LDAPServer ldap.acme.com PerlSetVar LDAPPort 389 PerlSetVar UIDAttr uid require valid-user PerlAuthenHandler Apache::AuthNetLDAP Module Home:http://courses.unt.edu/mewilcox/ Graham Barr for writing Net::LDAP module. Henrik Strom for writing the Apache::AuthPerLDAP module which I derived this from. The O'Reilly "Programming Modules for Apache with Perl and C" (http://www.modperl.com).