Open ken-colvin opened 4 years ago
Can you show us the value of config('ldap_auth.identifiers.ldap.user_format')
? It should be 'uid=%s,dc=example,dc=com'
. Then, the %s
is replaced by the username.
Do you have this working with Laravel 6? Can you show me a demo? Basically, I used the defaults in your instructions, so I would assume it should work with your instructions.
Here you have the old instructions, no composer package, for Laravel 6: https://github.com/jotaelesalinas/laravel-adminless-ldap-auth/tree/d26ea52ddcc9a1336eb49a9c01469f51f8c83165.
I am following the guide and using correct details
Auth::attempt(['username' => 'einstein', 'password' => 'password'])
and getting the same error:
>>> Auth::attempt(['username' => 'einstein', 'password' => 'password'])
PHP Warning: ldap_bind(): Unable to bind to server: Invalid DN syntax in C:/Users/me/PhpstormProjects/project/vendor/adldap2/adldap2/src/Connections/Ldap.php on
line 345
Adldap/Auth/BindException with message 'Invalid DN syntax'
>>>
This is using Laravel 7.16.1
Hi @Nuvelle , did you solve the 'Invalid DN syntax' issue? What was the problem?
No, this is still an issue for me - I am too new to Laravel to have any real chance at fixing it myself.
Just reporting that it is an issue in the current Laravel version for me.
When I do php artisan tinker and enter
Auth::attempt(['username' => 'einstein', 'password' => 'password'])
I am getting this error
PHP Warning: ldap_bind(): Unable to bind to server: Invalid DN syntax in vendor/adldap2/adldap2/src/Connections/Ldap.php on line 346
I am printing out the username and password and it shows as username=username, password=secret