LDAP-Insufficient 'add' privilege to add the entry

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jjeanj1
    New Member
    • May 2007
    • 18

    LDAP-Insufficient 'add' privilege to add the entry

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

    [code=perl]
    $ldap = Net::LDAP->new("test.doma in.com", port=>3394) or die "Can not
    connected to LDAP \n";

    $mesg=$ldap->bind("uid=test user,ou=applica tionstest,o=sys temresourcestes t,o=hainet,dc=h ainet,dc=com",p assword=>"secre t");

    $cn="$last_name $first_name";
    #---------------------LDAP CONNECTION------------------
    #-----------------------------------------------------

    $dn="uid=$e_num ber,ou=applicat ionstest,o=syst emresourcestest ,o=hainet,dc=ha inet,dc=com";

    #$dn="uid=testu ser,dc=hainet,d c=com";

    if($action eq "A"){
    $result = $ldap->add($dn,
    attr => [
    'uid'=>'$e_numb er',
    'cn' =>'$cn',
    'sn' => '$first_name',
    'objectclass' => ['person','organ izationalPerson ',
    'inetOrgPerson' ],

    ]);

    $result->code && warn "error: ", $result->error;

    #$ldap->unbind;
    }

    }
    [/code]

    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.
    Last edited by numberwhun; Sep 9 '07, 03:23 PM. Reason: add code tags
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by jjeanj1
    Hi,
    all i am writing a perl script to do a a bulk add of users from a file and load it to LDAP

    [code=perl]
    $ldap = Net::LDAP->new("test.doma in.com", port=>3394) or die "Can not
    connected to LDAP \n";

    $mesg=$ldap->bind("uid=test user,ou=applica tionstest,o=sys temresourcestes t,o=hainet,dc=h ainet,dc=com",p assword=>"secre t");

    $cn="$last_name $first_name";
    #---------------------LDAP CONNECTION------------------
    #-----------------------------------------------------

    $dn="uid=$e_num ber,ou=applicat ionstest,o=syst emresourcestest ,o=hainet,dc=ha inet,dc=com";

    #$dn="uid=testu ser,dc=hainet,d c=com";

    if($action eq "A"){
    $result = $ldap->add($dn,
    attr => [
    'uid'=>'$e_numb er',
    'cn' =>'$cn',
    'sn' => '$first_name',
    'objectclass' => ['person','organ izationalPerson ',
    'inetOrgPerson' ],

    ]);

    $result->code && warn "error: ", $result->error;

    #$ldap->unbind;
    }

    }
    [/code]

    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

    Comment

    • jjeanj1
      New Member
      • May 2007
      • 18

      #3
      Originally posted by numberwhun
      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.

      Comment

      Working...