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!
Topic on Extension talk:LDAPAuthentication2
Which logs are you looking at? LDAP logs should give you all information you need.
When i set mediawii them up they just don't work, just the db queries work
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
Can you give me some more insight into the configuration? Have you enabled additional extensions?
No, just the requested by the tutorial
- Extension:LDAPAuthorization
- Extension:LDAPAuthentication2
- Extension:LDAPGroups
- Extension:LDAPProvider
- Extension:LDAPUserInfo
- Extension:PluggableAuth
The configuration matches the tutorial too, but i can't make logs work, it's like the tutorial that you gave me.
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.
that's the error
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!
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.