Topic: LDAP + Mediawiki
==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: Ubuntu 12
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====
Hi,
I am trying to install in another server mediawiki with auth LDAP on main server.
I have LDAP installed and working on main server and mediawiki running too in another server. Now I want to install plugin LDAP on mediawiki, but I can't do it because I receive some fails.
Info
LocalSettings.php
require_once( "extensions/LdapAuthentication/LdapAuthentication.php" );
$wgAuth = new LdapAuthenticationPlugin();
$wgLDAPDomainNames = array("iRedMail");
$wgLDAPServerNames = array("iRedMail" => "192.168.XX.XX");
$wgLDAPPort = array("iRedMail" => 389);
$wgLDAPEncryptionType = array( "iRedMail" => "clear");
$wgLDAPBaseDNs = array( "iRedMail"=>"o=domains,dc=example,dc=com");
$wgLDAPProxyAgent = array("iRedMail"=>"cn=vmail,dc=example,dc=com");
$wgLDAPProxyAgentPassword = array( "iRedMail"=>"PasswordBindPW");
$wgLDAPUserBaseDNs = array( "iRedMail"=>"o=domains,dc=example,dc=com");
$wgLDAPSearchAttributes = array( "iRedMail" => "mail");
$wgLDAPLowerCaseUsername = array( "iRedMail"=>true);
$wgLDAPUseLocal = true;
$wgLDAPDebug = 3;
$wgDebugLogGroups['ldap'] = '/tmp/debug.log';
If I try to connect I receive this on debug.log
2016-12-02 09:19:38 mikro wikidb: 2.1.0 basedn is o=domains,dc=example,dc=com
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Using base: o=domains,dc=example,dc=com
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Setting the LDAPUsername based on fetched wgLDAPSearchAttributes: pepe@mx.example.com
2016-12-02 09:19:38 mikro wikidb: 2.1.0 userdn is: mail=pepe@mx.example.com,ou=Users,domainName=mx.example.com,o=domains,dc=example,dc=com
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Binding as the user
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Bound successfully
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getGroups
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering checkGroups
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getPreferences
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Authentication passed
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getCanonicalName
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Username is: Pepe@mx.example.com
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Munged username: Pepe@mx.example.com
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Allowing the local domain, adding it to the list.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering allowPasswordChange
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering modifyUITemplate
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Allowing the local domain, adding it to the list.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getCanonicalName
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Username is: Admin
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Entering getDomain
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Pulling domain from session.
2016-12-02 09:19:38 mikro wikidb: 2.1.0 Munged username: Admin
I see "Succesfully" on connect to LDAP server but Mediawiki can't login with this error:
Automatic creation of a local account failed: A valid username was not specified.
Why? How could I fix it?
Maybe Should I edit some config on Mediawiki to disable automatic creation account?
Maybe Am I using bad values on String?
Thanks
Greetings.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.