Active Directory Login


I’m unable to login to foreman using AD user.

I’ve successfully integrated the foreman machine (CentOS 7) with Windows AD.
I can now login to AD user (user1) in the command line executing the following command:

su - user1 --> OK

However, when I try to login to Foreman GUI

Username: user1
Password: XXXXX

I have the error : “Incorrect username or password”

This is my LDAP Authentication configuration :

LDAP server tab

Name: AD
Host: 192.168.x.x
Port: 389
Server type: Active Directory

When I click on the button “Test Connection” it’s says successful

Account tab:

Base DN: DC=xxx,DC=xxx,DC=xxx,DC=xxx,DC=com
Groups base DN: OU=Users,DC=xxx,DC=xxx,DC=xxx,DC=xxx,DC=com
Onthefly Register: checked
Usergroup Sync: checked

Attribute mappings tab:

Attr Login: sAMAccountName
Attr Firstname: givenName
Attr Lastname: sn
Attr Mail: mail

This is what the logs says:

2019-11-11T08:19:04 [I|app|04ab6] Processing by UsersController#login as HTML
2019-11-11T08:19:04 [I|app|04ab6] Parameters: {“utf8”=>“✓”, “authenticity_token”=>“AYeY0VkpGADOEJ6JaoE3HnrES7psqEQp/BrRdIPtQO7TSW7NOmrC5IwiPTpM2JbiInmVi4GSFTr5OcMOzhv17g==”, “login”=>{“login”=>“user1”, “password”=>"[FILTERED]"}, “commit”=>“Log In”}
2019-11-11T08:19:04 [I|app|04ab6] invalid user
2019-11-11T08:19:04 [W|app|04ab6] Failed login attempt from 192.168.xx.254 with username ‘user1’
2019-11-11T08:19:04 [I|app|04ab6] Redirected to https://192.168.xx.xx/users/login
2019-11-11T08:19:04 [I|app|04ab6] Completed 302 Found in 30ms (ActiveRecord: 9.9ms)

Foreman version: 1.19
Katello version: 3.8