0

Here is the configuration from devise_ldap_authenticatable document:

Edit config/ldap.yml and set our access details:

# [...]
development:
  host: ldap.phys.ethz.ch
  port: 389
  attribute: uid
  base: o=ethz,c=ch
# [...]
Generate the devise views:
.....................

And here is the information I can get, it is in Brats(I don't konw what it is) tool setting, it is about our LDAP server specific information:

"ldap_root_dn": "changedItAbcXCwgRHVjLE9VPUVuZ2luZWVyaW5nLE9VPUNBIFNhbnRhIENsYXJhIERELE9VPVVTIFVzZXJzLERDPWNvcnAsREM9ZW1jLERDPWNvbQ==",
"ldap_root_pwd": "rootPwd",
"ldap_server": "appauth.corp.company.com",
"ldap_port": "389",
"ldap_base_dn": "DC=corp,DC=company,DC=com",

I can find the "host", "port" is one-one corresponding relationship in devise_ldap_authenticatable and Brats. In my understanding, "DC" should be put to "base:" in rails (devise_ldap_authenticatable).

But where should i put the "ldap_root_dn", "ldap_root_pwd"? What is the corresponding part in rails. I guess "ldap_root_dn" should be put to "base:" as "DN=", or "DC="? I am not sure.

Could anybody can help me about this? Thanks.

2 Answers 2

1

Just for some people meet the same question.

  1. In ldap.yml

attribute: sAMAccountName

........

admin_user: your correct root dn

admin_password: you correct pw

2 In devise.rb

config.ldap_use_admin_to_bind = true

After that every thing works fine, and logic is clear.

Sign up to request clarification or add additional context in comments.

Comments

0

Please read devise_ldap_authenticatable documentation, and follow this screencast.

I think you can add in ldap.yml additional entries for your credentials such as admin_user and admin_password.

enter image description here

2 Comments

I followed link wiki.phys.ethz.ch/readme/… and video. It is always failed. The log showed:DAP: LDAP search for login: cn=myusername LDAP: LDAP search yielded 0 matches I think the request is sent and ldap server have received and processed it. But result is failed, is it right?
If my answers give you some help, can you please vote it ip ? If you can not see some error message, then it should be good I guess.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.