0

Could anyone please explain why I get this error. I got this error(on server) while trying to bind any user in ldap server. Also I get "Insufficient access rights" output when I run the program. And I dont get it while trying to bind admin. I provided access control in my slapd.conf like this :

 access to *
        by self write
        by * read
        by anonymous auth

Code:

require 'net/ldap'
con = Net::LDAP.new
con.host = 'localhost'
con.port = 389
con.auth 'cn=user,dc=example,dc=com', '123'

if con.bind
  # authentication succeeded
  puts 'success'
  puts con.get_operation_result
else
  # authentication failed
  puts 'fail'
  puts con.get_operation_result
 # p con.get_operation_result
end

Error:

 5a3e8945 >>> dnPrettyNormal: <cn=user,dc=example,dc=com>
    5a3e8945 <<< dnPrettyNormal: <cn=user,dc=example,dc=com>, <cn=user,dc=example,dc=com>
    5a3e8945 do_bind: version=3 dn="cn=user,dc=example,dc=com" method=128
    5a3e8945 bdb_dn2entry("cn=user,dc=example,dc=com")
    5a3e8945 => bdb_dn2id("dc=example,dc=com")
    5a3e8945 <= bdb_dn2id: got id=0x5
    5a3e8945 => bdb_dn2id("cn=user,dc=example,dc=com")
    5a3e8945 <= bdb_dn2id: got id=0x17
    5a3e8945 entry_decode: "cn=user,dc=example,dc=com"
    5a3e8945 <= entry_decode(cn=user,dc=example,dc=com)
    5a3e8945 => bdb_search
    5a3e8945 bdb_dn2entry("cn=kerberoskdc,cn=config,dc=example,dc=com")
    5a3e8945 => bdb_dn2id("cn=config,dc=example,dc=com")
    5a3e8945 <= bdb_dn2id: get failed: DB_NOTFOUND: No matching key/data pair found (-30988)
    5a3e8945 entry_decode: "dc=example,dc=com"
    5a3e8945 <= entry_decode(dc=example,dc=com)
    5a3e8945 send_ldap_result: conn=-1 op=0 p=0
    5a3e8945 Entry *odusers_copy_entry(Operation *): Unable to locate cn=kerberoskdc,cn=config,dc=example,dc=com (32)
    5a3e8945 odusers_copy_krbrealm: No entry associated with KerberosKDC cn=kerberoskdc,cn=config,dc=example,dc=com
    5a3e8945 odusers_krb_auth: could not retrieve krb realm while authing user
    5a3e8945 send_ldap_result: conn=1000 op=0 p=3
    5a3e8945 send_ldap_response: msgid=1 tag=97 err=50
Praneetha
  • 1
  • 1
  • 4

1 Answers1

0

I do not see the "insufficent access rights" error, but what I can see is this error:

 5a3e8945 bdb_dn2entry("cn=kerberoskdc,cn=config,dc=example,dc=com")
    5a3e8945 => bdb_dn2id("cn=config,dc=example,dc=com")
    5a3e8945 <= bdb_dn2id: get failed: DB_NOTFOUND: No matching key/data pair found (-30988)

which could be related to this entries:

cn=config,dc=example,dc=com
cn=kerberoskdc,cn=config,dc=example,dc=com

Does that exist in your LDAP database?

Miguel Ortiz
  • 121
  • 3