By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,729 Members | 1,167 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,729 IT Pros & Developers. It's quick & easy.

LDAP-Insufficient 'add' privilege to add the entry

P: 18
Hi,
all i am writing a perl script to do a a bulk add of users from a file and load it to LDAP

Expand|Select|Wrap|Line Numbers
  1. $ldap = Net::LDAP->new("test.domain.com", port=>3394) or die "Can not 
  2. connected to LDAP \n"; 
  3.  
  4. $mesg=$ldap->bind("uid=testuser,ou=applicationstest,o=systemresourcestest,o=hainet,dc=hainet,dc=com",password=>"secret"); 
  5.  
  6. $cn="$last_name $first_name"; 
  7. #---------------------LDAP CONNECTION------------------ 
  8. #----------------------------------------------------- 
  9.  
  10. $dn="uid=$e_number,ou=applicationstest,o=systemresourcestest,o=hainet,dc=hainet,dc=com"; 
  11.  
  12. #$dn="uid=testuser,dc=hainet,dc=com"; 
  13.  
  14. if($action eq "A"){ 
  15. $result = $ldap->add($dn, 
  16. attr => [ 
  17. 'uid'=>'$e_number', 
  18. 'cn' =>'$cn', 
  19. 'sn' => '$first_name', 
  20. 'objectclass' => ['person','organizationalPerson', 
  21. 'inetOrgPerson' ], 
  22.  
  23. ]); 
  24.  
  25. $result->code && warn "error: ", $result->error; 
  26.  
  27. #$ldap->unbind; 
  28.  
  29.  
When i run this code i am getting an" Insufficient 'add' privilege to add"

is this an error related to my code or is it an error related to the factb that i don't have the rights to add user. I am very new to LDAP so your help would greatly be appreciated.
Sep 9 '07 #1
Share this Question
Share on Google+
2 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
Hi,
all i am writing a perl script to do a a bulk add of users from a file and load it to LDAP

Expand|Select|Wrap|Line Numbers
  1. $ldap = Net::LDAP->new("test.domain.com", port=>3394) or die "Can not 
  2. connected to LDAP \n"; 
  3.  
  4. $mesg=$ldap->bind("uid=testuser,ou=applicationstest,o=systemresourcestest,o=hainet,dc=hainet,dc=com",password=>"secret"); 
  5.  
  6. $cn="$last_name $first_name"; 
  7. #---------------------LDAP CONNECTION------------------ 
  8. #----------------------------------------------------- 
  9.  
  10. $dn="uid=$e_number,ou=applicationstest,o=systemresourcestest,o=hainet,dc=hainet,dc=com"; 
  11.  
  12. #$dn="uid=testuser,dc=hainet,dc=com"; 
  13.  
  14. if($action eq "A"){ 
  15. $result = $ldap->add($dn, 
  16. attr => [ 
  17. 'uid'=>'$e_number', 
  18. 'cn' =>'$cn', 
  19. 'sn' => '$first_name', 
  20. 'objectclass' => ['person','organizationalPerson', 
  21. 'inetOrgPerson' ], 
  22.  
  23. ]); 
  24.  
  25. $result->code && warn "error: ", $result->error; 
  26.  
  27. #$ldap->unbind; 
  28.  
  29.  
When i run this code i am getting an" Insufficient 'add' privilege to add"

is this an error related to my code or is it an error related to the factb that i don't have the rights to add user. I am very new to LDAP so your help would greatly be appreciated.
Well, that is not a Perl error. I would definitely say that you do not have permissions to add users to your LDAP. You may want to contact your administrator about this issue.

Regards,

Jeff
Sep 9 '07 #2

P: 18
Well, that is not a Perl error. I would definitely say that you do not have permissions to add users to your LDAP. You may want to contact your administrator about this issue.

Regards,

Jeff

thanks Jeff for your prompt reply.
Sep 9 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.