[dokuwiki] ldap authentication to Exchange
- From: Ryan Fowler <ryan.fowler@xxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Thu, 28 Sep 2006 10:40:33 -0500
Greetings,
While trying to get docuwiki to authenticate against my company's
Microsoft Exchange server, I managed to not need an account for the
application because the string that the person types into the username
field is the same one thatwould log into the ldap with. I did need to
make one change in ldap.class.php to facilitate this, and thought I
would share it with the group. All it does is set $dn to $user if $dn
is empty before the attempt to bind with the users information.
The patch follows in unified diff format.
Ryan
--- inc/auth/ldap.class.php 2006-03-09 14:32:34.000000000 -0600
+++ /home/rfowler/wiki/inc/auth/ldap.class.php 2006-09-28
09:55:43.000000000 -0500
@@ -31,7 +31,6 @@
// try to connect
if(!$this->_openLDAP()) $this->success = false;
-
// auth_ldap currently just handles authentication, so no
// capabilities are set
}
@@ -81,8 +80,10 @@
return false;
}
}
-
// Try to bind to with the dn if we have one.
+
+ //Why not?!?
+ if(empty($dn)) $dn = $user;
if(!empty($dn)) {
// User/Password bind
if(!@ldap_bind($this->con,$dn,$pass)){
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
Other related posts:
- » [dokuwiki] ldap authentication to Exchange