1

I am trying to add entries in my openldap server using ruby net/ldap gem by referring answer for this question [ Ruby net-ldap add user ] and I get error as 'modifications require authentication'. I dont understand which username and password to give in authenticate method. what should be login and pass in the above answer? I'm totally new to this topic so not sure what will be the username and password as I have'nt created any users yet.

Thanks in advance!

Praneetha
  • 303
  • 4
  • 17

1 Answers1

2

You need to authenticate a user that has write privileges in your LDAP (It could be an admin or someone else for instance). It is that user that will create your new entries.

ldap.auth admin_dn, admin_pass
ldap.add(...)
Samy Kacimi
  • 1,216
  • 9
  • 23
  • I could authenticate admin but when I try to authenticate a user that I created using ldap.add it fails. Why? – Praneetha Dec 18 '17 at 14:21
  • What is the code you used to authenticate the user? – Samy Kacimi Dec 18 '17 at 14:25
  • ldap.authenticate "cn=admin,dc=example,dc=com",'123' to authenticate admin and ldap.authenticate "cn=abc,ou=people,dc=example,dc=com",'abc' to authenticate users which created using ldap.add – Praneetha Dec 18 '17 at 17:35
  • Could you explain why I'm unable to authenticate with a user other than admin. Could you also help in resolving this https://stackoverflow.com/questions/47903648/what-is-insufficient-access-rights?noredirect=1#comment82801174_47903648. @ Samy Kacimi – Praneetha Dec 21 '17 at 07:12