Hi - is there a way (dangerous though) to clear a directory and start again? I am having an issue by which I can search for an entry, but not delete it.
Eg
[root@First-Line lib]# ldapsearch -x -W -D "cn=Manager,dc=TelecityGroup,dc=com" "cn=Sabayon user"
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: cn=Sabayon user
# requesting: ALL
#
# sabayon, People, TelecityGroup.com
dn: uid=sabayon,ou=People,dc=TelecityGroup,dc=com
uid: sabayon
cn: Sabayon user
givenName: Sabayon
sn: user
mail: sabayon@TelecityGroup.com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword:: e2NyeXB0fSEh
shadowLastChange: 14088
shadowMax: 99999
shadowWarning: 7
loginShell: /sbin/nologin
uidNumber: 86
gidNumber: 86
homeDirectory: /home/sabayon
gecos: Sabayon user
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
[root@First-Line lib]# ldapdelete -x -D "cn=Manager,dc=TelecityGroup,dc=com" -W "cn=Sabayon user,dc=TelecityGroup,dc=com"
Enter LDAP Password:
ldap_delete: No such object (32)
matched DN: dc=TelecityGroup,dc=com
I can supply any config info that is required.
Thanks
Fin Tang
-- Fin Tang - Unix Systems Administrator
TelecityGroup UK Limited 10th Floor, 6&7 Harbour Exchange Square, London, E14 9GE, United Kingdom
T: +44 (0)207 531 8738 F: +44 20 7005 6060 www.telecitygroup.com
TelecityGroup - where content meets connectivity.
Winner Best Pan European Data Centre Operator Award 2007, Data Centres Europe Awards.
TelecityGroup UK Limited. Registered in England 3607764 Registered Office: Masters House, 107 Hammersmith Road, London W14 0QH UK. VAT No. 766825682
No binding contract will be made between an employee of TelecityGroup and a third party either verbally or by email, until a written document has been signed on behalf of TelecityGroup.
On Wed, 30 Jul 2008, Fin.Tang@telecity.com wrote:
Hi - is there a way (dangerous though) to clear a directory and start again? I am having an issue by which I can search for an entry, but not delete it.
The entire directory? Stop slapd and use rm on *bdb* alock log.*, assuming back-{b,h}db. Make sure that you also check in any log directory that might be specified in DB_CONFIG.
Fin,
In your example, you are not passing a valid target DN to ldapdelete.
Have you tried this:
# ldapdelete -x -D "cn=Manager,dc=TelecityGroup,dc=com" -W "uid=sabayon,ou=People,dc=TelecityGroup,dc=com"
Fin.Tang@TeleCity.com wrote:
Hi – is there a way (dangerous though) to clear a directory and start again? I am having an issue by which I can search for an entry, but not delete it.
Eg
[root@First-Line lib]# ldapsearch -x -W -D "cn=Manager,dc=TelecityGroup,dc=com" "cn=Sabayon user"
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: cn=Sabayon user
# requesting: ALL
#
# sabayon, People, TelecityGroup.com
dn: uid=sabayon,ou=People,dc=TelecityGroup,dc=com
uid: sabayon
cn: Sabayon user
givenName: Sabayon
sn: user
mail: sabayon@TelecityGroup.com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword:: e2NyeXB0fSEh
shadowLastChange: 14088
shadowMax: 99999
shadowWarning: 7
loginShell: /sbin/nologin
uidNumber: 86
gidNumber: 86
homeDirectory: /home/sabayon
gecos: Sabayon user
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
[root@First-Line lib]# ldapdelete -x -D "cn=Manager,dc=TelecityGroup,dc=com" -W "cn=Sabayon user,dc=TelecityGroup,dc=com"
Enter LDAP Password:
ldap_delete: No such object (32)
matched DN: dc=TelecityGroup,dc=com
I can supply any config info that is required.
Thanks
Fin Tang
--
*Fin Tang* - Unix Systems Administrator
*TelecityGroup UK Limited* 10th Floor, 6&7 Harbour Exchange Square, London, E14 9GE, United Kingdom T: +44 (0)207 531 8738 F: +44 20 7005 6060 www.telecitygroup.com http://www.telecitygroup.com/
*TelecityGroup – where content meets connectivity*.
Winner Best Pan European Data Centre Operator Award 2007, Data Centres Europe Awards.
TelecityGroup UK Limited. Registered in England 3607764 Registered Office: Masters House, 107 Hammersmith Road, London W14 0QH UK. VAT No. 766825682
No binding contract will be made between an employee of TelecityGroup and a third party either verbally or by email, until a written document has been signed on behalf of TelecityGroup.
Fin.Tang@TeleCity.com wrote:
Hi – is there a way (dangerous though) to clear a directory and start again? I am having an issue by which I can search for an entry, but not delete it.
Eg
[root@First-Line lib]# ldapsearch -x -W -D "cn=Manager,dc=TelecityGroup,dc=com" "cn=Sabayon user"
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: cn=Sabayon user
# requesting: ALL
#
# sabayon, People, TelecityGroup.com
dn: uid=sabayon,ou=People,dc=TelecityGroup,dc=com
uid: sabayon
cn: Sabayon user
givenName: Sabayon
sn: user
mail: sabayon@TelecityGroup.com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword:: e2NyeXB0fSEh
shadowLastChange: 14088
shadowMax: 99999
shadowWarning: 7
loginShell: /sbin/nologin
uidNumber: 86
gidNumber: 86
homeDirectory: /home/sabayon
gecos: Sabayon user
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
[root@First-Line lib]# ldapdelete -x -D "cn=Manager,dc=TelecityGroup,dc=com" -W "cn=Sabayon user,dc=TelecityGroup,dc=com"
Enter LDAP Password:
ldap_delete: No such object (32)
matched DN: dc=TelecityGroup,dc=com
maybe you should run ldapdelete -x -D "cn=Manager,dc=TelecityGroup,dc=com" -W "uid=sabayon,ou=People,dc=TelecityGroup,dc=com" (using the dn from Your search result above)
--Klaus Lemkau
I can supply any config info that is required.
Thanks
Fin Tang
--
*Fin Tang* - Unix Systems Administrator
*TelecityGroup UK Limited* 10th Floor, 6&7 Harbour Exchange Square, London, E14 9GE, United Kingdom T: +44 (0)207 531 8738 F: +44 20 7005 6060 www.telecitygroup.com http://www.telecitygroup.com/
*TelecityGroup – where content meets connectivity*.
Winner Best Pan European Data Centre Operator Award 2007, Data Centres Europe Awards.
TelecityGroup UK Limited. Registered in England 3607764 Registered Office: Masters House, 107 Hammersmith Road, London W14 0QH UK. VAT No. 766825682
No binding contract will be made between an employee of TelecityGroup and a third party either verbally or by email, until a written document has been signed on behalf of TelecityGroup.
Fin.Tang@TeleCity.com wrote:
dn: uid=sabayon,ou=People,dc=TelecityGroup,dc=com
# ldapdelete [...] "cn=Sabayon user,dc=TelecityGroup,dc=com"
Compare the DN of the entry and the DN you're trying to delete: they differ. Try:
ldapdelete [options] "uid=sabayon,ou=People,dc=TelecityGroup,dc=com"
i.
openldap-software@openldap.org