Topic on Talk:LDAP hub/Migration from extension LDAPAuthentication

Migration from LDAP Authentication MAP Accounts

3
93.184.128.35 (talkcontribs)

Hi all,

i'am currently migrating from MediaWiki 1.15 with LDAP Authentication to MediaWiki 1.35 with LDAP Autheentication2.

Until now everything works as expected, SSO is activated in (IIS 2019), users are logging automatically and accounts created automatically.

But some users are still present in DB. Is there any chance to map thoose existing accounts to the users logging in with the same username ? For now evey time a user is logging in, a new account is created.

Usernames are currently differ only in uppercase or lowercase characters.


I did some tests with the following settings without success.....

$LDAPAuthentication2AllowLocalLogin = false;

$wgAuthRemoteuserAllowUserSwitch = true;

$wgPluggableAuth_EnableAutoLogin  = true ;

$wgPluggableAuth_EnableLocalProperties = true;

$LDAPAuthentication2sernameNormalizer = 'strtolower';


All plugin versions are 1.35


loaded plugins:

wfLoadExtensions( [

'Auth_remoteuser',

'PluggableAuth',

'LDAPProvider',

'LDAPAuthentication2',

'LDAPAuthorization',

'LDAPUserInfo',

'LDAPGroups',

'WikiEditor',

'HitCounters',

'TopTenPages'

] );


LDAP Config:

$config = [

"BRK-NT" => [

"connection" => [

"server" => "xxx",

"user" => "CN=xx,OU=xx,OU=xx,OU=ITZ,DC=xx,DC=xx,DC=xx",

"pass" => "xxxxx",

"options" => [

"LDAP_OPT_DEREF" => 1

],

"basedn" => "DC=xx,DC=xx,DC=xx",

"groupbasedn" => "DC=xx,DC=xx,DC=xx",

"userbasedn" => "DC=xx,DC=xx,DC=xx",

"searchattribute" => "samaccountname",

"searchstring" => "xx\\USER-NAME",

"usernameattribute" => "samaccountname",

"realnameattribute"=> "displayname",

"emailattribute"=> "mail",

"grouprequest"=>  "MediaWiki\\Extension\\LDAPProvider\\UserGroupsRequest\\UserMemberOf::factory",

"presearchusernamemodifiers"=> [ "spacestounderscores", "lowercase" ]

],

"userinfo" => [

"attributes-map" => [

"email" => "mail",

"realname" => "displayname",

"nickname" => "samaccountName",

]

],

"groupsync" => [

"mapping" => [

"bureaucrat" => $LDAP_Groups_bureaucrat,

"sysop" => $LDAP_Groups_sysop

]

],

"authorization" => [

"rules" => [

"groups" => $LDAP_Groups_required

]

]

]

];


thx in advance


lufi

Osnard (talkcontribs)

Looks like you have a typo in "$LDAPAuthentication2sernameNormalizer". Try to set

$LDAPAuthentication2UsernameNormalizer = $LDAPAuthorizationAutoAuthUsernameNormalizer = 'strtolower';
89.0.162.157 (talkcontribs)

Thx, looks good. Sry. I think this was a Copy and Paste fail......

Reply to "Migration from LDAP Authentication MAP Accounts"