From: Behruz R. <beh...@cp...> - 2001-04-04 16:36:33
|
Dean, You forgot to put SN between Quote sign 'sn'=> xxxxxx Behruz -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of Dean Benson Sent: Wednesday, April 04, 2001 9:22 AM To: per...@li... Subject: Writing to the LDAP database Ok newbie alert ... I've changed the IP and accounts/passwd to protect the innocent :) What am I doing wrong? The process binds to the ldap server and I know that the root dn is right because I can connect with the same on kldap and modify the database ... I used the example straight out of the perl module doc The following code returns the error: Bad name after Benson' at ldap-convert.pl line 19. <Code> use Net::LDAP; use Net::LDAP::Entry; $ldap = Net::LDAP->new('foo.com') or die "$@"; $ldap->bind ( # bind to a directory with dn and password dn => 'cn=root, dc=ifxcorp, dc=com', password => 'foopasswd' ); $result = $ldap->add ( dn => 'cn = Dean Benson, dc=ifxcorp, dc=com', attr => [ 'cn' => ['Dean Benson', 'Deaner Benson'], 'sn => 'Benson', 'mail' => 'be...@ho...', 'objectclass' => ['top', 'person', 'organizationalPerson', 'inetOrgPerson' ], ] ); $result->code && warn "failed to add entry: ", $result->error ; </Code> _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com |