我关注了' https://github.com/cschiewek/devise_ldap_authenticatable'
我在Rails控制台上遇到的错误
LDAP: LDAP search yielded 0 matches
LDAP: Not authorized because not authenticated.
Completed 401 Unauthorized in 19ms
我尝试在另一个Rails应用上运行ldap设置' redmine'
development:
host: dc01.toshiba.tw
port: 389
attribute: sAMAccountName
base: dc=toshiba,dc=tw
admin_user: redmine.rd@toshiba.tw
admin_password: adminredmine
ssl: false
# <<: *AUTHORIZATIONS
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div><%= f.label :email %><br />
<%= f.text_field :email, autofocus: true %></div>
Devise.setup do |config|
# ==> LDAP Configuration
# config.ldap_logger = true
config.ldap_create_user = true
# config.ldap_update_password = true
config.ldap_config = "#{Rails.root}/config/ldap.yml"
# config.ldap_check_group_membership = false
# config.ldap_check_attributes = true
# config.ldap_use_admin_to_bind = true
# config.ldap_ad_group_check = false
答案 0 :(得分:-1)
发展: 主持人:dc01.toshiba.tw 港口:389 attribute:sAMAccountName base:dc = toshiba,dc = tw admin_user:cn = redmine.rd,dc = toshiba,dc = tw admin_password:adminredmine ssl:false