Setting up campus ldap logins on a web directory


1a) For user based authentication, create a file /fs/www/path/to/webdir/.htaccess containing the following:
AuthType basic AuthName "University of Maryland Directory ID" AuthBasicProvider ldap AuthLDAPURL ldaps://directory.umd.edu/dc=umd,dc=edu AuthzLDAPAuthoritative on Require valid-user ErrorDocument 500 /errors/gradreview500.html
Note: This will not work for most student records. If you need to authenticate students, try visiting OIT CAS. Note also that the LDAP directory is not under the control of OIT, not CS staff, and may change behavior without notice.

1b) If you want to restrict use to specific ldap users then create a file /fs/www/path/to/webdir/.htaccess containing the following...

AuthType basic AuthName "University of Maryland Directory ID" AuthBasicProvider ldap AuthLDAPURL ldaps://directory.umd.edu/dc=umd,dc=edu AuthzLDAPAuthoritative on Require ldap-user username1 username2 username3....usernameN ErrorDocument 500 /errors/gradreview500.html

Note, .htaccess files affect the directory which contains them and all subdirectories. This is usually desired behavior, but be aware of it. If you want different behavior somewhere lower in the directory tree, you will need to create another .htpasswd to override the one above it.


Last Updated: Nov 2008