i have checked the files and found the first issue in ActiveDirectoryAuthorizer.php. i changed the line: if (!empty($credentials['username']) && !empty($credentials['password']) && ldap_bind($this->ldap_connection, $credentials['username'] . '@' . Config::get('auth_ad_domain'), $credentials['password'])) {
to: if (!empty($credentials['username']) && !empty($credentials['password']) && ldap_bind($this->ldap_connection,$credentials['username'],$credentials['password'])) {
after that no error visible in frontend.
But librenms.log still shows: production.ERROR: Auth Error (active_directory): No user (-1) [[email protected]]
in which file i have to change the samaccountname to upn to fix the auth error?
But I don’t know anymore… with this version if you switch from samaccountname to userprincipalname it will create a new user with an username like [email protected]. Like on this picture :
Should I try to work on an other implementation, in order to be able to login with either the samaccoutname or userprincipalname, but always use the samaccountname as username in the librenms database ?
I think my first version was working like that but I didn’t like that the username was displayed as samaccountname instead of UPN…
The dropdown menu for Username attribut come with my patch, but I will try to work on an other version in order to use the same user for either sAMAccountName or UserPrincipalName.
works great now with upn, only got in logfile: production.ERROR: Auth Error (active_directory): No user (-1) [[email protected]]
do you know where this come from?