Page MenuHomePhabricator

Could not login on LDAP
Closed, InvalidPublic

Description

I've a problem with my migration to MW 1.33 from LDAPAutthentication to LDAP Hub.
I have used these extensions:

wfLoadExtension( 'LDAPProvider' );
wfLoadExtension( 'PluggableAuth' );
wfLoadExtension( 'LDAPAuthentication2' );
$LDAPAuthentication2AllowLocalLogin = true;
$LDAPProviderDomainConfigs = "$IP/extensions/LDAPProvider/ldapprovider.json";

with ldapprovider.json:

{
    "dcname": {
        "connection": {
            "server": "dc.domain.de",
             "port": "389",
            "user": "user@domain.com",
            "pass": "Password": [
                {"LDAP_OPT_DEREF": 1}
            ],
            "basedn": "dc=dcname,dc=dcname,dc=de",
            "groupbasedn": "ou=Mitarbeiter,dc=dcname,dc=dcname,dc=de",
            "userbasedn": "ou=Mitarbeiter,dc=dcname,dc=dcname,dc=de",
            "searchattribute": "samaccountname",
            "searchstring": "samaccountname=*,dc=dcname,dc=dcname,dc=de",
            "usernameattribute": "samaccountname",
           "realnameattribute": "cn",
            "emailattribute": "mail"
        }
    }
}

It has no error. It shown only >> Could not authenticate credentials against domain "DomainName" after login.

And i got an Error when i debug this command:

# php extensions/LDAPProvider/maintenance/CheckLogin.php --domain "domainName" --username "wiki_test"

Warning: ldap_set_option() expects parameter 2 to be integer, string given in /var/www/html/extensions/LDAPProvider/src/PlatformFunctionWrapper.php on line 54
Warning: ldap_set_option() expects parameter 2 to be integer, string given in /var/www/html/extensions/LDAPProvider/src/PlatformFunctionWrapper.php on line 54

#php extensions/LDAPProvider/maintenance/ShowUserInfo.php --domain domainName --username wiki_test

Warning: ldap_set_option() expects parameter 2 to be integer, string given in /var/www/html/extensions/LDAPProvider/src/PlatformFunctionWrapper.php on line 54
Warning: ldap_set_option() expects parameter 2 to be integer, string given in /var/www/html/extensions/LDAPProvider/src/PlatformFunctionWrapper.php on line 54
objectclass =>
  0 => top
  1 => person
  2 => organizationalPerson
  3 => user
  cn => wiki test
  sn => test
  givenname => wiki
  instancetype => 4
  whencreated => 20191011093905.0Z
  whenchanged => 20191011093905.0Z
  displayname => wiki test
  usncreated => 197415
  name => wiki test
  objectguid => 1ơFo(D>
  badpwdcount => 0
  codepage => 0
  countrycode => 0
  badpasswordtime => 0
  lastlogoff => 0
  lastlogon => 0
  primarygroupid => 513
  objectsid => p'

  accountexpires => xxxx
  logoncount => 0
  samaccountname => wiki_test
  samaccounttype => 805306368
  userprincipalname => wiki_test@domainname.de
  objectcategory => CN=Person,CN=Schema,CN=Configuration,DC=dcname,DC=dcname,DC=de
  pwdlastset => xxxxxxxx
  useraccountcontrol => 66048
  usnchanged => 197418
  distinguishedname => CN=wiki test,OU=Technische-/Testbenutzer,OU=Mitarbeiter,DC=dcname,DC=dcname,DC=de
  dn => CN=wiki test,OU=Technische-/Testbenutzer,OU=Mitarbeiter,DC=dcname,DC=dcname,DC=de

Any suggestions on what could be changed?

Thank you

Event Timeline

Nansci45 created this task.Oct 16 2019, 9:57 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 16 2019, 9:57 AM
Peachey88 updated the task description. (Show Details)
Ebe123 added a subscriber: Ebe123.Nov 11 2019, 6:56 PM

The "pass": "Password": [{"LDAP_OPT_DEREF": 1}] lines are invalid as you're assigning a key to a key.

Ebe123 closed this task as Invalid.Nov 18 2019, 8:04 PM