Thread:Project:Support desk/LDAP Auto Authetication file

Hello,

I have managed to configure the LDAP/AD and users are able to type in their windows credentials and password at the mediawiki login page with my domain name displayed at the dropdownlist. However, when I tried to implement the LdapAutoAuthentication.php file as follows, the domain at the dropdownlist become blank and the password entered although is correct, it denies my entry into the site. Why is this happening? Need enlightenment please! Huge thanks to all!!

require_once( "$IP/extensions/LdapAuthentication/LdapAuthentication.php" ); require_once( "$IP/extensions/LdapAuthentication/LdapAutoAuthentication.php" ); //$wgAuth = new LdapAuthenticationPlugin; #Commented out for autologin $wgLDAPAutoAuthDomain = "MYDOMAIN"; //uncomment for auto login $wgDiff3 = "";

$wgLDAPDomainNames = array( "MYDOMAIN" ); $wgLDAPServerNames = array( "MYDOMAIN" => "MYDOMAINSERVER" ); $wgLDAPSearchStrings = array( "MYDOMAIN" => "USER-NAME@MYDOMAIN" );
 * 1) Authenticate against Active Directory

$wgLDAPEncryptionType = array( "MYDOMAIN" => "clear" ); $wgLDAPUseLocal = false; $wgMinimalPasswordLength = 1;

$wgLDAPBaseDNs = array( 'MYDOMAIN' => 'cn=Users,dc=domain,dc=com' ); $wgLDAPSearchAttributes = array( 'MYDOMAIN' => 'sAMAccountName' ); $wgLDAPGroupUseFullDN = array( "MYDOMAIN"=>true ); $wgLDAPBaseDNs = array( 'MYDOMAIN' => 'dc=MYDOMAIN,dc=example,dc=com' ); $wgLDAPSearchAttributes = array( 'MYDOMAIN' => 'sAMAccountName' ); $wgLDAPGroupsUseMemberOf = array( "MYDOMAIN" => true );

//The objectclass of the groups we want to search for $wgLDAPGroupObjectclass = array( "MYDOMAIN"=>"group" );

//The attribute used for group members $wgLDAPGroupAttribute = array( "MYDOMAIN"=>"member" );

//The naming attribute of the group $wgLDAPGroupNameAttribute = array( "MYDOMAIN"=>"cn" ); $userid = $_SERVER['REMOTE_USER']; $wgLDAPAutoAuthUsername = $userid; AutoAuthSetup;