I never program in Perl, but i use a lot ldapjdk. Are you sure your directory configuration contains info for classes posixAccount and shadowAccount (do they exist in your directory schema) ?
"Alejandro Arana" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all, > > My system is Linux Red Hat 7.1 with openldap 2.0.7, Netscape SDK, > perl-ldap and i am trying to create a user entry from perl using this code: > > ... > $entry = $conn->newEntry(); > $dn = "uid=$uid,ou=People," . $config{base}; > $entry->setDN ($dn); > $entry->{objectclass} = [ "top", "account", "posixAccount", > "shadowAccount" ]; > $entry->addValue("uid", $uid); > $entry->addValue("cn", "User Test"); > $conn->add($entry); > ... > > and always get this error: > > 65:Object class violation > > If i change the $entry->{objectclass}= [ "top", "account", > "posixAccount", "shadowAccount" ]; to > > $entry->{objectclass} = [ "top"]; > > the user entry is created, but i can't add attributes because the other > object classes is not defined. > > Does anyone have a perl code that create a user entry in LDAP? > > > Thanks > > Alejandro A. > > > >
