Topic on Extension talk:LDAP Authentication

How to fix the "Automatic account creation is not allowed" without AuthManager when using LDAP

2
82.75.122.213 (talkcontribs)

I use Mediawiki 1.27.3. LDAP authentication is required but since we upgraded the error "Automatic account creation is not allowed" occured for new LDAP users.

We used to authenticate using LdapAuthenticationPlugin() in LocalSettings.php, but since this is deprecated, the correct way to fix it would be using AuthManager, like below:

$wgAuthManagerAutoConfig['primaryauth'] += [

    LdapPrimaryAuthenticationProvider::class => [

    'class' => LdapPrimaryAuthenticationProvider::class,

    'args' => [ ['authoritative' => true, ] ],

    'sort' => 50,    ],

];

However, this didn't work for us, since it couldn't authenticate with the LDAP server (according to our logs). We even set the following in our LocalSettings:

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

That didn't work either, *until* we restarted our apache service. So, keep in mind that you need to do that.

That is a temporary fix in my opinion, until AuthManager is updated so that it works with LDAP. Hope this helps...

155.4.45.19 (talkcontribs)

You are a legend. Thank you!

Reply to "How to fix the "Automatic account creation is not allowed" without AuthManager when using LDAP"