From: Armin F. <ar...@co...> - 2002-03-05 15:11:54
|
On Tue, 5 Mar 2002, Jim Harle wrote: > Here are a few things to try. > > Make sure that you print the full dn ($dn) and that it is what you think. i am sure to use the correct (and fully specified) dn. > Use a generic tool like ldapsearch to display the contents of that dn and > and also the contents of something created by the vendor's tool that you > think should be very similar. It is possible that their tool expects a > certain objectclass or attribute to be present that you aren't supplying. ldapsearch brings: # # filter: (objectclass=*) # requesting: ALL # # PersonalAddressBook, armin_info, user_info, CCN, cisco.com dn: ou=PersonalAddressBook,ou=armin_info,ou=user_info,ou=CCN,o=cisco.com objectClass: organizationalUnit objectClass: top ou: PersonalAddressBook # search result search: 2 result: 0 Success text: Success # numResponses: 2 # numEntries: 1 when i try to delete it with ldapdelete the specific object: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "cn=BBBB,ou=PersonalAddressBook,ou=armin_info,ou=user_info,ou=CCN,o=cisco.com" ldap_init( x.x.x.x, y ) deleting entry "cn=BBBB,ou=PersonalAddressBook,ou=armin_info,ou=user_info,ou=CCN,o=cisco.com" deleting children of: cn=BBBB,ou=PersonalAddressBook,ou=armin_info,ou=user_info,ou=CCN,o=cisco.com ldap_search: No such object matched DN: "ou=PersonalAddressBook,ou=armin_info,ou=user_info,ou=CCN,o=cisco.com" additional info: No such object Delete Result: No such object (32) Additional info: No such object Matched DN: ou=PersonalAddressBook,ou=armin_info,ou=user_info,ou=CCN,o=cisco.com when i try to delete the whole tree: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "ou=PersonalAddressBook,ou=armin_info,ou=user_info,ou=CCN,o=cisco.com" ldap_init( x.x.x.x, y ) deleting entry "ou=PersonalAddressBook,ou=armin_info,ou=user_info,ou=CCN,o=cisco.com" deleting children of: ou=PersonalAddressBook,ou=armin_info,ou=user_info,ou=CCN,o=cisco.com Delete Result: Operation not allowed on nonleaf (66) Additional info: The operation cannot be performed on a non-leaf node > Use Net::LDAP to delete the object with the same dn. Check the status > that comes back to be sure that it worked. It is possible that the dn > that you are dinding with doesn't have sufficient privileges to eithr add > a certain attribute of to deleted objects. this is what i originally did: $BASE1="ou=PersonalAddressBook,ou="; $USER="armin"; $BASE2="_info,ou=user_info,ou=CCN,o=cisco.com"; dn="cn=BBBB,".$BASE1.$USER.$BASE2; $ldapresults=$ldapconnection->add ($dn,attr=>['objectClass'=>['top', 'person', 'ciscoocUser', 'dcdPerson', 'organizationalPerson', 'inetOrgPerson']]); print "x ".$ldapresults->error." x\n"; $ldapresults=$ldapconnection->search (base=>$BASE1.$USER.$BASE2,filter=>'cn=*'); print "x ".$ldapresults->error." x\n"; foreach $entry ($ldapresults->all_entries) { print sprintf("%s",$entry->get("cn"))."\n"; } $ldapresults=$ldapconnection->delete ($dn); print "x ".$ldapresults->error." x\n"; this script returns: x The entry already exists x x Success x x No such object x when i first tried to create an entry, i didn't specify any objectclass. there is no permission problem with the login, with the same login and different utilities, i can modify the ldap-directory without any problem. kind regards, armin fuerst > > --Jim Harle > > On Tue, 5 Mar 2002, Armin Fuerst wrote: > > > > > hi! > > > > i am using the Net::LDAP library to create a little maintenance utility > > for a ldap-server. > > searching and removing was working perfectly, but i now have a problem > > adding new entries. > > the ldap-server used is from data connection limited. > > i created a new entry using (before, i used 'new' and 'bind'): > > > > $ldapresults=$ldapconnection->add ($dn) > > > > and this did something in the database, but i'm not sure exactly what. > > when i try to search this entry, i don't see it (but i see other entries). > > with the directory admin tool that came with the ldap-server, i see the > > entry, but when i try to access it, i receive the error-message, that the > > entry has been deleted. when i try again, the entry appears again and when > > i try to delete it, the directory admin closes without any comment > > (crashes?). > > > > when i try to create the entry again (like above), i get the > > error-message: "The entry already exists", when i try to delete it, i get > > the error-message : "No such object". > > when i try to delete the whole tree in the directory admin, i get the > > error-message: > > Unable to delete the entry "..." (or any of its superiors) because this > > area of the directroy contains links or aliases. > > > > > > can you please tell me: > > * how can i get rid of the entry? > > * what did i do wrong when trying to create the entry? > > > > kind regards, > > > > armin fuerst > > > > > |