The following ldapsearch command works flawlessly.
ldapsearch -LLL -s sub -P 3 -D "CN =, OU = IT, OU = Non-Users, OU = Users, OU = UserAccount, DC =, DC = com" -H ldaps: //. com: -w '' -v -b 'OU = Users, OU = UserAccount, DC =, DC = com' '(& (objectclass = person) (sAMAccountName =))'
But, no matter how I double-check the correctness of the entered values, this, configured in gitlab.yml, does not work.
ldap:
enabled: true
host: '.com'
port:
uid: 'sAMAccountName'
method: 'ssl'
bind_dn: 'CN =, OU = IT, OU = Non-Users, OU = Users, OU = UserAccount, DC =, DC = com '
password:' '
allow_username_or_email_login: true
base:' OU = Users, OU = UserAccount, DC =, DC = com '
user_filter:' '
group_base:' '
Yes, BindDN is located in a different place than other users, but to the south of it, so the query base is valid.
All attempts cause this error on the screen:
Unable to authenticate you from LDAP because "Invalid credentials"
production.log points to the following:
GET "/users/sign_in" 127.0.0.1 2014-07-18 08:13:17 -0400
Devise:: SessionController # new HTML
200 OK 21ms (: 12.8ms | ActiveRecord: 0.0ms)
POST" /users/auth/ldap/callback " 127.0.0.1 2014-07-18 08:13:25 -0400
OmniauthCallbacksController # HTML
: {" utf8 "= > " โ "," authenticity_token "= > " "," username "= > " "," password "= > " [FILTERED] "}
http:///users/sign_in
302 3 (ActiveRecord: 0.0ms)
GET "/users/sign_in" 127.0.0.1 2014-07-18 08:13:56 -0400
Devise:: SessionController # new HTML
200 OK 10 (: 5.9ms | ActiveRecord: 0.0ms)
POST" /users/auth/ldap/callback " 127.0.0.1 2014-07-18 08:20:03 -0400
LDAP - Active Directory, , , "badPwdCount" , , .
, , , , octuple, , - . , .
?