2002-06-13 11:59:10 +08:00
|
|
|
.TH LDAPDELETE 1 "RELEASEDATE" "OpenLDAP LDVERSION"
|
1999-09-12 12:41:47 +08:00
|
|
|
.\" $OpenLDAP$
|
2011-01-05 08:42:37 +08:00
|
|
|
.\" Copyright 1998-2011 The OpenLDAP Foundation All Rights Reserved.
|
1999-09-12 12:41:47 +08:00
|
|
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
1998-08-09 08:43:13 +08:00
|
|
|
.SH NAME
|
1999-08-20 01:02:36 +08:00
|
|
|
ldapdelete \- LDAP delete entry tool
|
1998-08-09 08:43:13 +08:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B ldapdelete
|
1998-12-06 12:09:55 +08:00
|
|
|
[\c
|
|
|
|
.BR \-n ]
|
|
|
|
[\c
|
|
|
|
.BR \-v ]
|
|
|
|
[\c
|
|
|
|
.BR \-c ]
|
|
|
|
[\c
|
2009-06-03 08:43:44 +08:00
|
|
|
.BR \-M [ M ]]
|
1999-07-16 10:45:46 +08:00
|
|
|
[\c
|
1998-12-06 12:09:55 +08:00
|
|
|
.BI \-d \ debuglevel\fR]
|
|
|
|
[\c
|
|
|
|
.BI \-f \ file\fR]
|
|
|
|
[\c
|
|
|
|
.BI \-D \ binddn\fR]
|
|
|
|
[\c
|
1998-12-12 13:56:46 +08:00
|
|
|
.BR \-W ]
|
|
|
|
[\c
|
1998-12-06 12:09:55 +08:00
|
|
|
.BI \-w \ passwd\fR]
|
|
|
|
[\c
|
2002-08-24 14:19:39 +08:00
|
|
|
.BI \-y \ passwdfile\fR]
|
|
|
|
[\c
|
2000-08-25 13:31:59 +08:00
|
|
|
.BI \-H \ ldapuri\fR]
|
|
|
|
[\c
|
1998-12-06 12:09:55 +08:00
|
|
|
.BI \-h \ ldaphost\fR]
|
|
|
|
[\c
|
2009-06-03 08:43:44 +08:00
|
|
|
.BR \-P \ { 2 \||\| 3 }]
|
1998-12-27 22:08:46 +08:00
|
|
|
[\c
|
2009-06-08 23:42:24 +08:00
|
|
|
.BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
|
|
|
|
[\c
|
|
|
|
.BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
|
|
|
|
[\c
|
1998-12-06 12:09:55 +08:00
|
|
|
.BI \-p \ ldapport\fR]
|
|
|
|
[\c
|
2009-06-03 08:43:44 +08:00
|
|
|
.BI \-O \ security-properties\fR]
|
2000-04-20 17:23:51 +08:00
|
|
|
[\c
|
2001-01-18 16:04:56 +08:00
|
|
|
.BI \-U \ authcid\fR]
|
2000-04-20 17:23:51 +08:00
|
|
|
[\c
|
2002-09-03 03:25:10 +08:00
|
|
|
.BI \-R \ realm\fR]
|
|
|
|
[\c
|
2004-11-10 11:58:39 +08:00
|
|
|
.BR \-r ]
|
|
|
|
[\c
|
2000-07-16 08:52:04 +08:00
|
|
|
.BR \-x ]
|
|
|
|
[\c
|
2000-07-17 10:43:41 +08:00
|
|
|
.BR \-I ]
|
|
|
|
[\c
|
|
|
|
.BR \-Q ]
|
|
|
|
[\c
|
2000-04-20 17:23:51 +08:00
|
|
|
.BI \-X \ authzid\fR]
|
|
|
|
[\c
|
|
|
|
.BI \-Y \ mech\fR]
|
|
|
|
[\c
|
2007-12-28 05:08:29 +08:00
|
|
|
.BI \-z \ sizelimit\fR]
|
|
|
|
[\c
|
2009-06-03 08:43:44 +08:00
|
|
|
.BR \-Z [ Z ]]
|
2000-04-20 17:23:51 +08:00
|
|
|
[\c
|
2009-06-03 08:43:44 +08:00
|
|
|
.IR DN \ [ ... ]]
|
1998-08-09 08:43:13 +08:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.I ldapdelete
|
|
|
|
is a shell-accessible interface to the
|
2006-06-14 08:28:16 +08:00
|
|
|
.BR ldap_delete_ext (3)
|
1998-08-09 08:43:13 +08:00
|
|
|
library call.
|
|
|
|
.LP
|
|
|
|
.B ldapdelete
|
|
|
|
opens a connection to an LDAP server, binds, and deletes one or more
|
2000-08-20 14:21:38 +08:00
|
|
|
entries. If one or more \fIDN\fP arguments are provided, entries with
|
|
|
|
those Distinguished Names are deleted. Each \fIDN\fP should be provided
|
2006-06-10 01:20:38 +08:00
|
|
|
using the LDAPv3 string representation as defined in RFC 4514.
|
2009-06-03 08:43:44 +08:00
|
|
|
If no \fIDN\fP arguments
|
1998-08-09 08:43:13 +08:00
|
|
|
are provided, a list of DNs is read from standard input (or from
|
2009-06-03 08:43:44 +08:00
|
|
|
\fIfile\fP if the \fB\-f\fP flag is used).
|
1998-08-09 08:43:13 +08:00
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
|
|
|
.B \-n
|
|
|
|
Show what would be done, but don't actually delete entries. Useful for
|
2009-06-03 08:43:44 +08:00
|
|
|
debugging in conjunction with \fB\-v\fP.
|
1998-08-09 08:43:13 +08:00
|
|
|
.TP
|
|
|
|
.B \-v
|
|
|
|
Use verbose mode, with many diagnostics written to standard output.
|
|
|
|
.TP
|
|
|
|
.B \-c
|
|
|
|
Continuous operation mode. Errors are reported, but
|
|
|
|
.B ldapdelete
|
|
|
|
will continue with deletions. The default is to exit after
|
|
|
|
reporting an error.
|
|
|
|
.TP
|
2009-06-03 08:43:44 +08:00
|
|
|
.BR \-M [ M ]
|
1999-07-16 10:45:46 +08:00
|
|
|
Enable manage DSA IT control.
|
|
|
|
.B \-MM
|
|
|
|
makes control critical.
|
|
|
|
.TP
|
1998-12-06 12:09:55 +08:00
|
|
|
.BI \-d \ debuglevel
|
1998-08-09 08:43:13 +08:00
|
|
|
Set the LDAP debugging level to \fIdebuglevel\fP.
|
|
|
|
.B ldapdelete
|
|
|
|
must be compiled with LDAP_DEBUG defined for this option to have any effect.
|
|
|
|
.TP
|
1998-12-06 12:09:55 +08:00
|
|
|
.BI \-f \ file
|
2002-06-02 05:41:09 +08:00
|
|
|
Read a series of DNs from \fIfile\fP, one per line, performing an
|
|
|
|
LDAP delete for each.
|
1998-08-09 08:43:13 +08:00
|
|
|
.TP
|
2000-07-16 08:52:04 +08:00
|
|
|
.B \-x
|
|
|
|
Use simple authentication instead of SASL.
|
|
|
|
.TP
|
1998-12-06 12:09:55 +08:00
|
|
|
.BI \-D \ binddn
|
2000-08-20 14:21:38 +08:00
|
|
|
Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
|
2009-06-03 08:43:44 +08:00
|
|
|
For SASL binds, the server is expected to ignore this value.
|
1998-08-09 08:43:13 +08:00
|
|
|
.TP
|
1998-12-12 13:56:46 +08:00
|
|
|
.B \-W
|
|
|
|
Prompt for simple authentication.
|
|
|
|
This is used instead of specifying the password on the command line.
|
|
|
|
.TP
|
1998-12-06 12:09:55 +08:00
|
|
|
.BI \-w \ passwd
|
1998-08-09 08:43:13 +08:00
|
|
|
Use \fIpasswd\fP as the password for simple authentication.
|
|
|
|
.TP
|
2002-08-24 14:19:39 +08:00
|
|
|
.BI \-y \ passwdfile
|
|
|
|
Use complete contents of \fIpasswdfile\fP as the password for
|
|
|
|
simple authentication.
|
|
|
|
.TP
|
2000-08-25 13:31:59 +08:00
|
|
|
.BI \-H \ ldapuri
|
2005-04-08 03:57:38 +08:00
|
|
|
Specify URI(s) referring to the ldap server(s); only the protocol/host/port
|
|
|
|
fields are allowed; a list of URI, separated by whitespace or commas
|
|
|
|
is expected.
|
2000-08-25 13:31:59 +08:00
|
|
|
.TP
|
1998-12-06 12:09:55 +08:00
|
|
|
.BI \-h \ ldaphost
|
1998-08-09 08:43:13 +08:00
|
|
|
Specify an alternate host on which the ldap server is running.
|
2009-06-03 08:43:44 +08:00
|
|
|
Deprecated in favor of \fB\-H\fP.
|
1998-08-09 08:43:13 +08:00
|
|
|
.TP
|
1998-12-06 12:09:55 +08:00
|
|
|
.BI \-p \ ldapport
|
1998-08-09 08:43:13 +08:00
|
|
|
Specify an alternate TCP port where the ldap server is listening.
|
2009-06-03 08:43:44 +08:00
|
|
|
Deprecated in favor of \fB\-H\fP.
|
1998-12-27 22:08:46 +08:00
|
|
|
.TP
|
2009-06-03 08:43:44 +08:00
|
|
|
.BR \-P \ { 2 \||\| 3 }
|
1998-12-27 22:08:46 +08:00
|
|
|
Specify the LDAP protocol version to use.
|
1999-12-07 03:02:39 +08:00
|
|
|
.TP
|
2009-06-08 23:42:24 +08:00
|
|
|
.BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
|
|
|
|
.TP
|
|
|
|
.BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
|
|
|
|
|
2011-01-05 05:45:01 +08:00
|
|
|
Specify general extensions with \fB\-e\fP and delete extensions with \fB\-E\fP.
|
2009-06-08 23:42:24 +08:00
|
|
|
\'\fB!\fP\' indicates criticality.
|
|
|
|
|
|
|
|
General extensions:
|
|
|
|
.nf
|
2011-01-05 05:45:01 +08:00
|
|
|
[!]assert=<filter> (an RFC 4515 Filter)
|
|
|
|
!authzid=<authzid> ("dn:<dn>" or "u:<user>")
|
|
|
|
[!]bauthzid (RFC 3829 authzid control)
|
|
|
|
[!]chaining[=<resolve>[/<cont>]]
|
2009-06-08 23:42:24 +08:00
|
|
|
[!]manageDSAit
|
|
|
|
[!]noop
|
|
|
|
ppolicy
|
2011-01-05 05:45:01 +08:00
|
|
|
[!]postread[=<attrs>] (a comma-separated attribute list)
|
|
|
|
[!]preread[=<attrs>] (a comma-separated attribute list)
|
|
|
|
[!]relax
|
|
|
|
sessiontracking
|
|
|
|
abandon,cancel,ignore (SIGINT sends abandon/cancel,
|
|
|
|
or ignores response; if critical, doesn't wait for SIGINT.
|
|
|
|
not really controls)
|
2009-06-08 23:42:24 +08:00
|
|
|
.fi
|
|
|
|
|
2011-01-05 05:45:01 +08:00
|
|
|
Delete extensions:
|
2009-06-08 23:42:24 +08:00
|
|
|
.nf
|
2011-01-05 05:45:01 +08:00
|
|
|
(none)
|
2009-06-08 23:42:24 +08:00
|
|
|
.fi
|
|
|
|
.TP
|
2000-07-17 10:43:41 +08:00
|
|
|
.B \-r
|
1999-12-07 03:02:39 +08:00
|
|
|
Do a recursive delete. If the DN specified isn't a leaf, its
|
|
|
|
children, and all their children are deleted down the tree. No
|
|
|
|
verification is done, so if you add this switch, ldapdelete will
|
|
|
|
happily delete large portions of your tree. Use with care.
|
2000-04-20 17:23:51 +08:00
|
|
|
.TP
|
2007-12-28 05:08:29 +08:00
|
|
|
.BI \-z \ sizelimit
|
|
|
|
Use \fIsizelimit\fP when searching for children DN to delete,
|
|
|
|
to circumvent any server-side size limit. Only useful in conjunction
|
2009-06-03 08:43:44 +08:00
|
|
|
with \fB\-r\fP.
|
2007-12-28 05:08:29 +08:00
|
|
|
.TP
|
2000-07-14 06:54:45 +08:00
|
|
|
.BI \-O \ security-properties
|
|
|
|
Specify SASL security properties.
|
2000-04-20 17:23:51 +08:00
|
|
|
.TP
|
2000-07-17 10:43:41 +08:00
|
|
|
.B \-I
|
|
|
|
Enable SASL Interactive mode. Always prompt. Default is to prompt
|
|
|
|
only as needed.
|
|
|
|
.TP
|
|
|
|
.B \-Q
|
|
|
|
Enable SASL Quiet mode. Never prompt.
|
|
|
|
.TP
|
2001-01-18 16:04:56 +08:00
|
|
|
.BI \-U \ authcid
|
|
|
|
Specify the authentication ID for SASL bind. The form of the identity depends on the
|
2000-04-20 17:23:51 +08:00
|
|
|
actual SASL mechanism used.
|
|
|
|
.TP
|
2002-09-03 03:25:10 +08:00
|
|
|
.BI \-R \ realm
|
|
|
|
Specify the realm of authentication ID for SASL bind. The form of the realm
|
|
|
|
depends on the actual SASL mechanism used.
|
|
|
|
.TP
|
2000-04-20 17:23:51 +08:00
|
|
|
.BI \-X \ authzid
|
|
|
|
Specify the requested authorization ID for SASL bind.
|
|
|
|
.I authzid
|
|
|
|
must be one of the following formats:
|
2009-06-03 08:43:44 +08:00
|
|
|
.BI dn: "<distinguished name>"
|
2000-04-20 17:23:51 +08:00
|
|
|
or
|
2009-06-03 08:43:44 +08:00
|
|
|
.BI u: <username>
|
2000-04-20 17:23:51 +08:00
|
|
|
.TP
|
|
|
|
.BI \-Y \ mech
|
|
|
|
Specify the SASL mechanism to be used for authentication. If it's not
|
|
|
|
specified, the program will choose the best mechanism the server knows.
|
|
|
|
.TP
|
2009-06-03 08:43:44 +08:00
|
|
|
.BR \-Z [ Z ]
|
2000-06-14 10:35:42 +08:00
|
|
|
Issue StartTLS (Transport Layer Security) extended operation. If you use
|
2009-06-03 08:43:44 +08:00
|
|
|
\fB\-ZZ\fP, the command will require the operation to be successful.
|
1998-08-09 08:43:13 +08:00
|
|
|
.SH EXAMPLE
|
|
|
|
The following command:
|
|
|
|
.LP
|
|
|
|
.nf
|
2001-09-04 10:41:53 +08:00
|
|
|
ldapdelete "cn=Delete Me,dc=example,dc=com"
|
1998-08-09 08:43:13 +08:00
|
|
|
.fi
|
|
|
|
.LP
|
2001-09-04 10:41:53 +08:00
|
|
|
will attempt to delete the entry named "cn=Delete Me,dc=example,dc=com".
|
2001-01-04 02:20:07 +08:00
|
|
|
Of course it would probably be necessary to supply authentication
|
|
|
|
credentials.
|
1998-08-09 08:43:13 +08:00
|
|
|
.SH DIAGNOSTICS
|
|
|
|
Exit status is 0 if no errors occur. Errors result in a non-zero exit
|
|
|
|
status and a diagnostic message being written to standard error.
|
|
|
|
.SH "SEE ALSO"
|
1998-11-11 07:37:30 +08:00
|
|
|
.BR ldap.conf (5),
|
1998-08-09 08:43:13 +08:00
|
|
|
.BR ldapadd (1),
|
|
|
|
.BR ldapmodify (1),
|
|
|
|
.BR ldapmodrdn (1),
|
|
|
|
.BR ldapsearch (1),
|
|
|
|
.BR ldap (3),
|
2006-06-14 08:28:16 +08:00
|
|
|
.BR ldap_delete_ext (3)
|
2000-07-14 06:54:45 +08:00
|
|
|
.SH AUTHOR
|
|
|
|
The OpenLDAP Project <http://www.openldap.org/>
|
1998-10-25 09:41:42 +08:00
|
|
|
.SH ACKNOWLEDGEMENTS
|
2006-06-14 08:28:16 +08:00
|
|
|
.so ../Project
|