Topic on Extension talk:LdapAuth

Authentication Email error

4
Patt435 (talkcontribs)

I have Mediawiki 1.30 installed on Debian Linux

i´ve used the config in LocalSettings.php from TrixTri, it establishes the connection to LDAP but it trys to sync with email somehow, the User created on AD has no email address.

I get this Error:


Shanept\LdapAuth\Exceptions\MappingException from line 177 of /srv/http/mediawiki/extensions/LdapAuth/src/Groups/LdapGroupSync.php: No email found for "MyADUser".

Backtrace:

#0 /srv/http/mediawiki/extensions/LdapAuth/src/Groups/LdapGroupSync.php(94): Shanept\LdapAuth\Groups\LdapGroupSync->fetchData()

#1 /srv/http/mediawiki/extensions/LdapAuth/src/Auth/PrimaryAuthenticationProvider.php(192): Shanept\LdapAuth\Groups\LdapGroupSync->map()

#2 /srv/http/mediawiki/includes/auth/AuthManager.php(2444): Shanept\LdapAuth\Auth\PrimaryAuthenticationProvider->postAuthentication(User, MediaWiki\Auth\AuthenticationResponse)

#3 /srv/http/mediawiki/includes/auth/AuthManager.php(695): MediaWiki\Auth\AuthManager->callMethodOnProviders(integer, string, array)

#4 /srv/http/mediawiki/includes/auth/AuthManager.php(384): MediaWiki\Auth\AuthManager->continueAuthentication(array)

#5 /srv/http/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(353): MediaWiki\Auth\AuthManager->beginAuthentication(array, string)

#6 /srv/http/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(482): AuthManagerSpecialPage->performAuthenticationStep(string, array)

#7 /srv/http/mediawiki/includes/htmlform/HTMLForm.php(660): AuthManagerSpecialPage->handleFormSubmit(array, VFormHTMLForm)

#8 /srv/http/mediawiki/includes/specialpage/AuthManagerSpecialPage.php(416): HTMLForm->trySubmit()

#9 /srv/http/mediawiki/includes/specialpage/LoginSignupSpecialPage.php(313): AuthManagerSpecialPage->trySubmit()

#10 /srv/http/mediawiki/includes/specialpage/SpecialPage.php(569): LoginSignupSpecialPage->execute(NULL)

#11 /srv/http/mediawiki/includes/specialpage/SpecialPageFactory.php(558): SpecialPage->run(NULL)

#12 /srv/http/mediawiki/includes/MediaWiki.php(288): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)

#13 /srv/http/mediawiki/includes/MediaWiki.php(865): MediaWiki->performRequest()

#14 /srv/http/mediawiki/includes/MediaWiki.php(515): MediaWiki->main()

#15 /srv/http/mediawiki/index.php(42): MediaWiki->run()

#16 {main}


thanks for help


TrixTri (talkcontribs)

So you are using Microsoft's Active Directory, it should not be running those functions from what I can tell, did you forget to add the line $wgLdapAuthIsActiveDirectory = true;

or do something odd like use the line $wgLdapAuthIsOpenLDAP = true;

Patt435 (talkcontribs)

this is the config of LocalSettings.php that i use:


wfLoadExtension( 'LdapAuth' );

$wgGroupPermissions['*'] ['autocreateaccount'] = true;

$wgLdapAuthDomainNames = ['abc.local'];

$wgLdapAuthServers = ['abc.local' => ['srv-dc01.abc.local', 'srv-dc02.abc.local']];

$wgLdapAuthDisplayName  = ['abc.local' => 'abc'];

#$wgLdapAuthBindDN = [ 'abc.local' => 'CN=ABC,OU=Users,DC=abc,DC=local'];

#$wgLdapAuthBindPass = ['abc.local' => 'validaduserspassword'];

$wgLdapAuthEncryptionType = ['abc.local' => 'none'];

$wgLdapAuthSearchFilter = ['abc.local' => '(&(objectClass=user)(sAMAccountName=%1$s))']; # (&(objectClass=user)(sAMAccountName=%1$s)(memberof=CN=GRP - WikiUsers,OU=Groups,DC=abc,DC=local)), (memberof=DC=abc,DC=local)

$wgLdapAuthBaseDN = ['abc.local' => 'DC=abc,DC=local']; // OU=abc,

#$wgLdapAuthBaseDN = ['false'];

$wgLdapAuthIsActiveDirectory = true;

$wgLdapAuthUsernameField = ['abc.local' => 'sAMAccountName'];

$wgLdapAuthSearchTree = ['abc.local' => true];

$wgLdapAuthMapGroups = ['abc.local' => []];

#$wgLdapAuthUseLocal = true;

#Enable Scure Login

$wgSecureLogin = true;


EDit: Yes its a MS Directory Server. i just added $wgLdapAuthIsOpenLDAP = true; and now it works!

TrixTri (talkcontribs)

Did not expect that to fix your problem I have to admit, but as it's working lets walk away slowly smiling before we p*ss it off.

Reply to "Authentication Email error"