Hello,
I have an LDAP server working with the following config
----slapd.conf----- include /etc/openldap/schema/core.schema include /etc/openldap/schema/cosine.schema include /etc/openldap/schema/inetorgperson.schema include /etc/openldap/schema/nis.schema allow bind_v2 pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args database bdb suffix "dc=proxy2,dc=xs,dc=edu,dc=ph" rootdn "uid=root,cn=Users,dc=xs1,dc=xs,dc=edu,dc=ph"
----base.ldif----- dn: dc=proxy2,dc=xs,dc=edu,dc=ph objectClass: top objectClass: dcObject objectClass: domain o: xs dc: proxy2 description: Proxy2 Domain dn: ou=Group,dc=proxy2,dc=xs,dc=edu,dc=ph objectClass: top objectClass: organizationalUnit ou: Group dn: ou=Users,dc=proxy2,dc=xs,dc=edu,dc=ph objectClass: top objectClass: organizationalUnit ou: Users
----user1.ldif------ dn: uid=user01,ou=Users,dc=proxy2,dc=xs,dc=edu,dc=ph uid: user01 cn: user01 objectClass: top objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson sn: user01 userPassword: user01
----LocalSettings.php------- require_once( "$IP/includes/DefaultSettings.php" ); require_once( "$IP/extensions/LdapAuthentication.php" ); $wgAuth = new LdapAuthenticationPlugin(); $wgLDAPDomainNames = array("proxy2.xs.edu.ph"); $wgLDAPServerNames = array("proxy2.xs.edu.ph"=>"proxy2.xs.edu.ph"); $wgLDAPUseLocal = true; $wgLDAPEncryptionType = array("proxy2.xs.edu.ph"=>"clear"); $wgLDAPBaseDNs = array("proxy2.xs.edu.ph"=>"dc=proxy2,dc=xs,dc=edu,dc=ph"); $wgLDAPSearchAttributes = array("proxy2.xs.edu.ph"=>"uid"); $wgLDAPGroupsPrevail = array("proxy2.xs.edu.ph"=>true); $wgLDAPGroupNameAttribute = array("proxy2.xs.edu.ph"=>"cn"); $wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['read'] = true; $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['createpage'] = false; $wgGroupPermissions['*']['createtalk'] = false; -------------------
The LDAP server is working as I am able to do an ldapadd, ldapdelete and ldapsearch on the server or any computer with openldap-client installed. The problem is on media wiki with the LdapAuthentication extension. Whenever I login with username: user01 and password: user01, I do not have any php errors but it returns a message on the login page:Login error Incorrect password entered. Please try again. But when I enter a wrong username I get this error:Undefined offset: 0 in /xxx/wiki/extensions/LdapAuthentication.php on line 1028.
What could be the problem here? Is there a required data structure for LDAP to be followed in order to work well with the media wiki extension or is there anything wrong with my LocalSettings.php?
Thanking in advance for your support.