Authentication against Open LDAP

Hi

Authentication fails with invalid user name or password.

Req:4880 UID:- UserInfo result FAILURE [UserInfo] User couldn’t be authenticated, aborting call.

:order:

  • 192.168.***
    192.168.***
    :mapping_generate: true
    :mapping_timeout: 300
    :mapping_filename: server1.yaml
    :mapping_key: GROUP_DN
    :mapping_default: 1
    :user: ‘admin’
    :password: ‘pass’
    :auth_method: :simple
    :host: 192.168.***
    :port: 389
    :base: ‘dc=labs,dc=in’
    :user_field: uid

Can you guys help?

When I run the ruby auth script

[root@localhost ~]# ruby -wd /var/lib/one/remotes/auth/ldap/authenticate vuser - pass
Exception LoadError' at /usr/share/rubygems/rubygems.rb:1096 - cannot load such file -- rubygems/defaults/ruby ExceptionLoadError’ at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55 - cannot load such file – abrt
\Exception LoadError' at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:141 - cannot load such file -- abrt /var/lib/one/remotes/auth/ldap/authenticate:42: warning: assigned but unused variable - pass ExceptionNameError’ at /usr/share/ruby/psych/core_ext.rb:16 - method to_yaml' not defined in Object ExceptionNameError’ at /usr/share/ruby/psych/core_ext.rb:29 - method yaml_as' not defined in Module ExceptionNameError’ at /usr/share/ruby/psych/deprecated.rb:80 - undefined method to_yaml_properties' for classObject’
/usr/lib/one/ruby/opennebula/xml_utils.rb:94: warning: -' after local variable is interpreted as binary operator /usr/lib/one/ruby/opennebula/xml_utils.rb:94: warning: even though it seems like unary operator /usr/lib/one/ruby/opennebula/xml_pool.rb:25: warning: method redefined; discarding old initialize /usr/lib/one/ruby/opennebula/xml_element.rb:411: warning: previous definition of initialize was here /usr/lib/one/ruby/opennebula/xml_pool.rb:31: warning: method redefined; discarding old each_element /usr/lib/one/ruby/opennebula/xml_element.rb:417: warning: previous definition of each_element was here ExceptionLoadError’ at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55 - cannot load such file – nokogiri
Exception LoadError' at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- ox ExceptionLoadError’ at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55 - cannot load such file – xmlparser
Exception LoadError' at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:141 - cannot load such file -- xmlparser /usr/lib/one/ruby/opennebula/virtual_machine_pool.rb:297: warning: assigned but unused variable - acct_hash /usr/lib/one/ruby/opennebula/host.rb:136: warning: ambiguous first argument; put parentheses or even spaces /usr/lib/one/ruby/opennebula/vdc.rb:176: warning: method redefined; discarding old add_host /usr/lib/one/ruby/opennebula/vdc.rb:164: warning: previous definition of add_host was here /usr/lib/one/ruby/opennebula/vdc.rb:192: warning: method redefined; discarding old del_host /usr/lib/one/ruby/opennebula/vdc.rb:186: warning: previous definition of del_host was here ExceptionLoadError’ at /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55 - cannot load such file – net/ldap
/usr/local/share/gems/gems/net-ldap-0.15.0/lib/net/ldap/password.rb:22: warning: assigned but unused variable - attribute_value
/usr/local/share/gems/gems/net-ldap-0.15.0/lib/net/ldap/instrumentation.rb:15: warning: shadowing outer local variable - payload
/usr/local/share/gems/gems/net-ldap-0.15.0/lib/net/ldap/connection.rb:44: warning: assigned but unused variable - encryption
/usr/local/share/gems/gems/net-ldap-0.15.0/lib/net/ldap/connection.rb:303: warning: assigned but unused variable - sort_control
Trying server 192.168.19.142
Exception Errno::EAGAIN' at /usr/share/ruby/net/protocol.rb:153 - Resource temporarily unavailable - read would block ExceptionErrno::EAGAIN’ at /usr/share/ruby/net/protocol.rb:153 - Resource temporarily unavailable - read would block
Exception Errno::EINPROGRESS' at /usr/share/ruby/socket.rb:54 - Operation now in progress - connect(2) would block ExceptionErrno::EINPROGRESS’ at /usr/share/ruby/socket.rb:54 - Operation now in progress - connect(2) would block
Exception `Errno::EINPROGRESS’ at /usr/share/ruby/socket.rb:54 - Operation now in progress - connect(2) would block
User vuser not found
Could not authenticate user vuser

Make sure that the attribute uid holds the user name.

yes I have passed the uid, which is ‘vuser’

The other things that could be wrong are:

  • Frontend is not able to connect to ldap server. Check telnet 192.168.19.142 389
  • Admin user and password is not correct, have you tested with ldapsearch?
  • base is incorrect and is not able to find the user there