From: Chris R. <chr...@ma...> - 2002-10-05 19:00:07
|
On 4/10/02 9:34 pm, Shiva Persaud-Deolall <sh...@us...> wrote: > Hi, > > I just started using the perl-ldap modules. I'm trying to add an entry to a > directory and I create it as follows: > > $spdentry = Net::LDAP::Entry->new; > > And I try to add it as follows: > > $spdentry->dn("cn=shiva"); The Net::LDAP::Entry manpage says this: "dn ( [ DN ] ) "Set or get the DN for the entry. With no arguments dn will return the current DN. If an argument is given then it will change the DN for the entry and return the previous value. "NOTE: these changes are local to the client and will not appear on the directory server until the update method is called." > $spdentry->add( > 'entry' => '777', > 'openeddate' => 'Aug 5' > ); > $mesg = $ldap->add($spdentry); I think the problem here is that you need to call update() instead of add(). You are also quite likely to need more attributes in your entry than just the ones in your example (like objectClass), but your initial problem is not calling update(). Cheers, Chris |