Thread:Extension talk:LDAP Authentication/Users authenticated by kerberos are not found in LDAP/reply

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

$wgLDAPDomainNames = array( "EXAMPLE" ); $wgLDAPServerNames = array( "EXAMPLE" => "ks1.example.org ks2.example.org" ); $wgLDAPBaseDNs = array( "EXAMPLE"=>"dc=example,dc=org" ); $wgLDAPSearchStrings = array( "EXAMPLE" => "uid=USER-NAME,ou=Users,dc=example,dc=org" ); $wgLDAPSearchAttributes = array( "EXAMPLE" => "uid" ); $wgLDAPEncryptionType = array( "EXAMPLE" => "clear" );
 * 1) Connect to LDAP server

$wgLDAPGroupsUseMemberOf = array( "EXAMPLE" => false ); $wgLDAPRequiredGroups = array( "EXAMPLE" => array("cn=wiki,ou=Groups,dc=example,dc=org") ); $wgLDAPGroupUseFullDN = array( "EXAMPLE" => false ); $wgLDAPGroupObjectClass = array( "EXAMPLE" => "posixGroup" ); $wgLDAPGroupAttribute = array( "EXAMPLE" => "memberUid" ); $wgLDAPGroupNameAttribute = array( "EXAMPLE" => "cn" ); $wgLDAPGroupSearchNestedGroups = array( "EXAMPLE" => false );
 * 1) Group based access

$wgLDAPUseLDAPGroups = array( "EXAMPLE" => true ); $wgGroupPermissions['wiki-edit']['edit'] = true; $wgGroupPermissions['wiki-admin'] = $wgGroupPermissions['sysop'];
 * 1) Permissions

$wgLDAPRetrievePrefs = array( "EXAMPLE" => true ); $wgLDAPPreferences = array( "EXAMPLE" => array( "email" => "mail", "realname" => "cn", "nickname" => "uid" ) );
 * 1) Retrive preferences from LDAP

$wgLDAPAutoAuthDomain = "EXAMPLE";
 * 1) Auth against

// REMOTE_USER will be in the form username@EXAMPLE.COM, if we // just chop off @EXAMPLE.COM, we have the username. You can change // this as needed. $wgLDAPAutoAuthUsername = preg_replace( '/@.*/', '', $_SERVER["REMOTE_USER"] );

$wgHooks['SetUsernameAttributeFromLDAP'][] = 'SetUsernameAttribute'; function SetUsernameAttribute(&$LDAPUsername, $info) { $LDAPUsername = $info[0]['uid'][0]; return true; }

// After we set all configuration options, we want to tell the // extension to enable auto-authentication. // This will create an instance of LdapAuthentication as $wgAuth. AutoAuthSetup;