Topic on Extension talk:LDAPAuthentication2/Flow

The user cannot be authenticated

10
189.9.13.89 (talkcontribs)

Hi! I've been having some problems while trying to make AD ldap authentication in my 1.39 version mediaWiki. I did fix a lot congrats to Cindy. But now i have this little problem. When i try to login it returns to me that the user cannot be authenticated. I checked the configuration files, php, LDAP connection, fixed some issues, but that problem still there. May someone help me? In the logs i'd not get some resourceful information, but i'm trying to collect more data. Thanks!

Osnard (talkcontribs)

Which logs are you looking at? LDAP logs should give you all information you need.

2804:14C:658F:8EAA:BDFC:E27E:C859:12F7 (talkcontribs)

When i set mediawii them up they just don't work, just the db queries work

2804:14C:658F:8EAA:BDFC:E27E:C859:12F7 (talkcontribs)

php extensions/LDAPProvider/maintenance/ShowUserInfo.php --domain YourDomain --username SomeUser php extensions/LDAPProvider/maintenance/ShowUserGroups.php --domain YourDomain --username SomeUser php extensions/LDAPProvider/maintenance/CheckLogin.php --domain YourDomain --username SomeUser


These tests works fine

Osnard (talkcontribs)

Can you give me some more insight into the configuration? Have you enabled additional extensions?

2804:14C:658F:8EAA:D54F:4EC2:2B64:DDAB (talkcontribs)
2804:14C:658F:8EAA:D54F:4EC2:2B64:DDAB (talkcontribs)

2023-09-21 19:01:47 servername wiki: In execute()

2023-09-21 19:01:47 servername wiki: Getting PluggableAuth instance

2023-09-21 19:01:47 servername wiki: Plugin name: LDAPAuthentication2

2023-09-21 19:01:48 servername wiki: Try to authenticate user: user

2023-09-21 19:01:48 servername wiki: Not local login. Checking LDAP...

2023-09-21 19:01:48 servername wiki: LDAP domain: my.domain

2023-09-21 19:01:48 servername wiki: Username not found in user info provided by LDAP!Please check LDAP domain configuration. Specifically usernameattribute

2023-09-21 19:01:48 servername wiki: LDAP user info results for user user: Array

(

    [cn] => user

    [sn] => user

    [givenname] => user

    [distinguishedname] => CN=user,OU=Users,DC=my,DC=domain

    [displayname] => user

    [memberof] => CN=user_wiki,OU=Groups,DC=my,DC=domain

    [name] => user

    [samaccountname] => user

    [userprincipalname] => user@my.domain

    [objectcategory] => CN=Person,CN=Schema,CN=Configuration,DC=my,DC=domain

    [dn] => CN=user,OU=Users,DC=my,DC=domain

)

2023-09-21 19:01:48 servername wiki: Authentication failure.

2804:14C:658F:8EAA:D54F:4EC2:2B64:DDAB (talkcontribs)

that's the error

2804:14C:658F:8EAA:D54F:4EC2:2B64:DDAB (talkcontribs)

I've got it! Actualli in the ldap.json file, in usernameattribute, i had to put a different value than "samaccountname", it was just "name". Thank you a lot for the support!

2804:14C:658F:8EAA:D54F:4EC2:2B64:DDAB (talkcontribs)

That information i've got in that part of the ad search return [name] => user, if someone's facing the same problem, i suggest to do that, watch the ad's return and match with the ldap.json file.

Reply to "The user cannot be authenticated"