Add entries in ldap server

391 views Asked by At

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!

1

There are 1 answers

4
Samy Kacimi On BEST ANSWER

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(...)