OK, I made a slight modification and now I get:

code: 32 msg: LDAP_NO_SUCH_OBJECT : The server cannot find an object specified in the request
msgID : 2      DN : ou=people,ou=tsl,o=company,c=com

Here's the code snippet:

$ldap = Net::LDAP->new("eespvanuu1");
$ldap->bind("cn=Directory Manager,ou=tsl,o=company,c=com", password=>'tempo123'); $result = $ldap->add("cn=ywong,uid=ywong,ou=People,ou=tsl,o=company,c=com",
               attrs => [ 'cn' => 'ywong',
                         'GECOS' => 'Yoko Wong',
                         'uid' => 'ywong',
                         'gidNumber' => '10000',
                         'uidNumber' => '16012',
                         'homeDirectory' => '/opt/home/ywong',
'objectclass' => [ 'top', 'posixaccount', 'account','shadowaccount']
                       ]
          );
if ($result->code) {
       print "code: ", $result->code;
       print " msg: ", $result->error_name;
       print " : ", $result->error_text;
       print " msgID : ", $result->mesg_id;
       print "\tDN : ", $result->dn;
       print "\n";
}

Graham Barr wrote:

On Aug 24, 2005, at 17:37 PM, Paul S. wrote:
I get this error:

error: Insufficient 'add' privilege to add the entry 'uid=ywong,ou=People,ou=tsl,o=telus,c=com'.

There's no error in the Sun DS logs.

Well that is the exact text they are returning in the message. It may help to look up the generic error code/name in the documentation. Look in their documentation for what
you get from any of the following

   $result->code
   $result->error_name
   $result->error_text

Graham.


Reply via email to