--On Monday, August 29, 2005 3:41 PM +0000 Paul <[EMAIL PROTECTED]>
wrote:
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";
}
Did you create an ou=People subtree?
and using cn=ywong,uid=ywong looks pretty odd... most people just use
uid=XXX...
--Quanah
--
Quanah Gibson-Mount
Principal Software Developer
ITSS/Shared Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
"These censorship operations against schools and libraries are stronger
than ever in the present religio-political climate. They often focus on
fantasy and sf books, which foster that deadly enemy to bigotry and blind
faith, the imagination." -- Ursula K. Le Guin