Thread:Extension talk:LDAP Authentication/Required Group and Preferences issue

Hi, I am having two issues one of which is not a huge deal but it would be nice if I could get it to work. The first problem I am having which I must get working is when I add a required group I can no longer get MediaWiki to log a user in. However, if I remove the requirement for that group all users in my AD environment can log in without issue. The second less important issue I have is if I enable Auto-login the preferences will no longer pull out of AD. If the user types their name and PW in the information pulls fine. I am running MediaWiki 1.16.4 on Windows Server 2k8 with IIS7, Extension Version 1.2e. Any help would be greatly appreciated.

require_once( "$IP/extensions/LdapAuthentication/LdapAuthentication.php" ); require_once( "$IP/extensions/LdapAuthentication/LdapAutoAuthentication.php" ); $wgAuth = new LdapAuthenticationPlugin ;

$wgLDAPDomainNames = array( 'COL' ); $wgLDAPServerNames = array( 'COL' =&gt; "server.domain.domain.tld" ); $wgLDAPBaseDNs = array( 'COL' =&gt; "dc=domain,dc=domain,dc=tld" ); $wgLDAPSearchAttributes = array( 'COL' =&gt; 'sAMAccountName' ); $wgLDAPSearchStrings = array( 'COL' =&gt; "COL\USER-NAME" ); $wgLDAPEncryptionType = array( 'COL' =&gt; 'clear'); $wgLDAPGroupSearchNestedGroups = array( 'COL' =&gt; true );

$wgLDAPUseLocal = false; $wgLDAPGroupBaseDNs = array( 'COL' =&gt; array( "ou=ou,dc=domain,dc=domain,dc=tld" ) ); $wgLDAPRequiredGroups = array( 'COL' =&gt; array( "cn=group,ou=ou,dc=domain,dc=domain,dc=tld" ) ); $wgLDAPGroupUseFullDN = array( 'COL' =&gt; true );

$wgLDAPGroupObjectclass = array( 'COL' =&gt; "group" ); $wgLDAPGroupAttribute = array( 'COL' =&gt; "member" ); $wgLDAPGroupNameAttribute = array( 'COL' =&gt; "cn" ); $wgLDAPGroupSearchNestedGroups = array( 'COL' =&gt; true );

$wgLDAPRetrievePrefs = array( 'COL' =&gt; true ); $wgLDAPPreferences = array( 'COL' =&gt; array( 'email'=&gt;'mail','realname'=&gt;'cn','nickname'=&gt;'sAMAccountName' ) );

$wgLDAPDebug = 3; $wgDebugLogGroups["ldap"] = "/tmp/debug.log" ; $wgShowExceptionDetails = true; $wgHooks['SetUsernameAttributeFromLDAP'][] = 'SetUsernameAttribute';
 * 1) debug

function SetUsernameAttribute(&amp;$LDAPUsername, $info) { $LDAPUsername = $info[0]['samaccountname'][0]; return true; }


 * 1) Set Auto

$wgLDAPAutoAuthDomain = 'COL'; $wgLDAPAutoAuthUsername = str_replace( 'COL\\', '', $_SERVER['REMOTE_USER'] ); AutoAuthSetup; Debug Output:

2011-05-17 22:59:51 wikidb: 1.2e Entering AutoAuthSetup. 2011-05-17 22:59:51 wikidb: 1.2e wgLDAPAutoAuthUsername is not null, adding hooks. 2011-05-17 22:59:52 wikidb: 1.2e Entering AutoAuthentication. 2011-05-17 22:59:52 wikidb: 1.2e User isn't logged in, calling setup. 2011-05-17 22:59:52 wikidb: 1.2e Setting domain as: COL 2011-05-17 22:59:52 wikidb: 1.2e Calling authenticate with username (user). 2011-05-17 22:59:52 wikidb: 1.2e Entering authenticate 2011-05-17 22:59:52 wikidb: 1.2e 2011-05-17 22:59:52 wikidb: 1.2e 2011-05-17 22:59:52 wikidb: 1.2e Entering Connect 2011-05-17 22:59:52 wikidb: 1.2e Using TLS or not using encryption. 2011-05-17 22:59:52 wikidb: 1.2e Using servers: ldap://server.domain.domain.tld 2011-05-17 22:59:52 wikidb: 1.2e Connected successfully 2011-05-17 22:59:52 wikidb: 1.2e Entering getSearchString 2011-05-17 22:59:52 wikidb: 1.2e Doing a straight bind 2011-05-17 22:59:52 wikidb: 1.2e userdn is: COL\user 2011-05-17 22:59:52 wikidb: 1.2e 2011-05-17 22:59:52 wikidb: 1.2e Entering getGroups 2011-05-17 22:59:52 wikidb: 1.2e Retrieving LDAP group membership 2011-05-17 22:59:52 wikidb: 1.2e Searching for the groups 2011-05-17 22:59:52 wikidb: 1.2e Entering searchGroups 2011-05-17 22:59:52 wikidb: 1.2e Entering getBaseDN 2011-05-17 22:59:52 wikidb: 1.2e basedn is Array 2011-05-17 22:59:52 wikidb: 1.2e User Filter: (&amp;(distinguishedName=COL\5cuser)(objectclass=user)) 2011-05-17 22:59:52 wikidb: 1.2e Search string: (&amp;(member=COL\5cuser)(objectclass=group)) 2011-05-17 22:59:52 wikidb: 1.2e No entries returned from search. 2011-05-17 22:59:52 wikidb: 1.2e Entering searchNestedGroups 2011-05-17 22:59:52 wikidb: 1.2e No more groups to search. 2011-05-17 22:59:52 wikidb: 1.2e Got the following nested groups: 2011-05-17 22:59:52 wikidb: 1.2e Entering checkGroups 2011-05-17 22:59:52 wikidb: 1.2e Checking for (new style) group membership 2011-05-17 22:59:52 wikidb: 1.2e Required groups: cn=group,ou=ou,dc=domain,dc=domain,dc=tld 2011-05-17 22:59:52 wikidb: 1.2e Couldn't find the user in any groups 2011-05-17 22:59:52 wikidb: 1.2e User wasn't found in LDAP, exiting. 2011-05-17 22:59:52 wikidb: 1.2e Entering NoLogout. 2011-05-17 22:59:52 wikidb: 1.2e Entering AutoAuthSetup. 2011-05-17 22:59:52 wikidb: 1.2e wgLDAPAutoAuthUsername is not null, adding hooks. 2011-05-17 22:59:52 wikidb: 1.2e Entering AutoAuthentication. 2011-05-17 22:59:52 wikidb: 1.2e User isn't logged in, calling setup. 2011-05-17 22:59:52 wikidb: 1.2e Setting domain as: COL 2011-05-17 22:59:52 wikidb: 1.2e Calling authenticate with username (user). 2011-05-17 22:59:52 wikidb: 1.2e Entering authenticate 2011-05-17 22:59:52 wikidb: 1.2e 2011-05-17 22:59:52 wikidb: 1.2e 2011-05-17 22:59:52 wikidb: 1.2e Entering Connect 2011-05-17 22:59:52 wikidb: 1.2e Using TLS or not using encryption. 2011-05-17 22:59:52 wikidb: 1.2e Using servers: ldap://server.domain.domain.tld 2011-05-17 22:59:52 wikidb: 1.2e Connected successfully 2011-05-17 22:59:52 wikidb: 1.2e Entering getSearchString 2011-05-17 22:59:52 wikidb: 1.2e Doing a straight bind 2011-05-17 22:59:52 wikidb: 1.2e userdn is: COL\user 2011-05-17 22:59:52 wikidb: 1.2e 2011-05-17 22:59:52 wikidb: 1.2e Entering getGroups 2011-05-17 22:59:52 wikidb: 1.2e Retrieving LDAP group membership 2011-05-17 22:59:52 wikidb: 1.2e Searching for the groups 2011-05-17 22:59:52 wikidb: 1.2e Entering searchGroups 2011-05-17 22:59:52 wikidb: 1.2e Entering getBaseDN 2011-05-17 22:59:52 wikidb: 1.2e basedn is Array 2011-05-17 22:59:52 wikidb: 1.2e User Filter: (&amp;(distinguishedName=COL\5cuser)(objectclass=user)) 2011-05-17 22:59:52 wikidb: 1.2e Search string: (&amp;(member=COL\5cuser)(objectclass=group)) 2011-05-17 22:59:52 wikidb: 1.2e No entries returned from search. 2011-05-17 22:59:52 wikidb: 1.2e Entering searchNestedGroups 2011-05-17 22:59:52 wikidb: 1.2e No more groups to search. 2011-05-17 22:59:52 wikidb: 1.2e Got the following nested groups: 2011-05-17 22:59:52 wikidb: 1.2e Entering checkGroups 2011-05-17 22:59:52 wikidb: 1.2e Checking for (new style) group membership 2011-05-17 22:59:52 wikidb: 1.2e Required groups: cn=group,ou=ou,dc=domain,dc=domain,dc=tld 2011-05-17 22:59:52 wikidb: 1.2e Couldn't find the user in any groups. 2011-05-17 22:59:52 wikidb: 1.2e User wasn't found in LDAP, exiting. 2011-05-17 22:59:52 wikidb: 1.2e Entering NoLogout.