HELLO!
Need some help here. Appreciate the help from all subject matter experts. So right now, I am trying to implement auto login to my mediawiki site. Currently, users are able to login to mediawiki using their windows account and password.
Next, I would like to implement the auto-login function (without them entering their credentials). Below is my code.
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 = ""; # Authenticate against Active Directory $wgLDAPDomainNames = array( "MYDOMAIN" ); $wgLDAPServerNames = array( "MYDOMAIN" => "MYDOMAINSERVER" ); $wgLDAPSearchStrings = array( "MYDOMAIN" => "USER-NAME@MYDOMAIN" ); $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();
Once I implemented the above, the domain name in my dropdownlist become empty and the username and password I entered denies my entry into the site although it is correct.
Why is this happening? Please assist! Greatly appreciated it!
THANKS ALL SO MUCH!