]> git.sur5r.net Git - openldap/blob - doc/man/man1/ldapdelete.1
450eda31a7f72a361802636638a3c2502fbf429e
[openldap] / doc / man / man1 / ldapdelete.1
1 .TH LDAPDELETE 1 "20 August 2000" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 ldapdelete \- LDAP delete entry tool
7 .SH SYNOPSIS
8 .B ldapdelete
9 [\c
10 .BR \-n ]
11 [\c
12 .BR \-v ]
13 [\c
14 .BR \-k ]
15 [\c
16 .BR \-K ]
17 [\c
18 .BR \-c ]
19 [\c
20 .BR \-C ]
21 [\c
22 .BR \-M[M] ]
23 [\c
24 .BI \-d \ debuglevel\fR]
25 [\c
26 .BI \-f \ file\fR]
27 [\c
28 .BI \-D \ binddn\fR]
29 [\c
30 .BR \-W ]
31 [\c
32 .BI \-w \ passwd\fR]
33 [\c
34 .BI \-h \ ldaphost\fR]
35 [\c
36 .BI \-P \ 2\fR\||\|\fI3\fR]
37 [\c
38 .BI \-p \ ldapport\fR]
39 [\c
40 .BR \-O \ security-properties ]
41 [\c
42 .BI \-U \ username\fR]
43 [\c
44 .BR \-x ]
45 [\c
46 .BR \-I ]
47 [\c
48 .BR \-Q ]
49 [\c
50 .BI \-X \ authzid\fR]
51 [\c
52 .BI \-Y \ mech\fR]
53 [\c
54 .BR \-Z[Z] ]
55 [\c
56 .IR dn ]...
57 .SH DESCRIPTION
58 .I ldapdelete
59 is a shell-accessible interface to the
60 .BR ldap_delete (3)
61 library call.
62 .LP
63 .B ldapdelete
64 opens a connection to an LDAP server, binds, and deletes one or more
65 entries.  If one or more \fIDN\fP arguments are provided, entries with
66 those Distinguished Names are deleted.  Each \fIDN\fP should be provided
67 using the LDAPv3 string representation as defined in RFC 2253.
68 If no \fIdn\fP arguments
69 are provided, a list of DNs is read from standard input (or from
70 \fIfile\fP if the -f flag is used).
71 .SH OPTIONS
72 .TP
73 .B \-n
74 Show what would be done, but don't actually delete entries.  Useful for
75 debugging in conjunction with -v.
76 .TP
77 .B \-v
78 Use verbose mode, with many diagnostics written to standard output.
79 .TP
80 .B \-k
81 Use Kerberos authentication instead of simple authentication.  It is
82 assumed that you already have a valid ticket granting ticket. This option
83 only has effect if
84 . B ldapdelete
85 is compiled with KERBEROS defined.
86 .TP
87 .B \-K
88 Same as \-k, but only does step 1 of the kerberos bind.  This is useful
89 when connecting to a slapd and there is no x500dsa.hostname principal
90 registered with your kerberos servers.
91 .TP
92 .B \-C
93 Automatically chase referrals.
94 .TP
95 .B \-c
96 Continuous operation mode.  Errors  are  reported,  but
97 .B ldapdelete
98 will  continue  with  deletions.   The default is to exit after
99 reporting an error.
100 .TP
101 .B \-M[M]
102 Enable manage DSA IT control.
103 .B \-MM
104 makes control critical.
105 .TP
106 .BI \-d \ debuglevel
107 Set the LDAP debugging level to \fIdebuglevel\fP.
108 .B ldapdelete
109 must be compiled with LDAP_DEBUG defined for this option to have any effect.
110 .TP
111 .BI \-f \ file
112 Read a series of lines from \fIfile\fP, performing one LDAP search for
113 each line.  In this case, the \fIfilter\fP given on the command line
114 is treated as a pattern where the first occurrence of \fB%s\fP is
115 replaced with a line from \fIfile\fP.
116 .TP
117 .B \-x 
118 Use simple authentication instead of SASL.
119 .TP
120 .BI \-D \ binddn
121 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
122 .TP
123 .B \-W
124 Prompt for simple authentication.
125 This is used instead of specifying the password on the command line.
126 .TP
127 .BI \-w \ passwd
128 Use \fIpasswd\fP as the password for simple authentication.
129 .TP
130 .BI \-h \ ldaphost
131 Specify an alternate host on which the ldap server is running.
132 .TP
133 .BI \-p \ ldapport
134 Specify an alternate TCP port where the ldap server is listening.
135 .TP
136 .BI \-P \ 2\fR\||\|\fI3
137 Specify the LDAP protocol version to use.
138 .TP
139 .B \-r
140 Do a recursive delete.  If the DN specified isn't a leaf, its
141 children, and all their children are deleted down the tree.  No
142 verification is done, so if you add this switch, ldapdelete will
143 happily delete large portions of your tree.  Use with care.
144 .TP
145 .BI \-O \ security-properties
146 Specify SASL security properties.
147 .TP
148 .B \-I
149 Enable SASL Interactive mode.  Always prompt.  Default is to prompt
150 only as needed.
151 .TP
152 .B \-Q
153 Enable SASL Quiet mode.  Never prompt.
154 .TP
155 .BI \-U \ username
156 Specify the username for SASL bind. The syntax of the username depends on the
157 actual SASL mechanism used.
158 .TP
159 .BI \-X \ authzid
160 Specify the requested authorization ID for SASL bind.
161 .I authzid
162 must be one of the following formats:
163 .B dn:\c
164 .I <distinguished name>
165 or
166 .B u:\c
167 .I <username>
168 .TP
169 .BI \-Y \ mech
170 Specify the SASL mechanism to be used for authentication. If it's not
171 specified, the program will choose the best mechanism the server knows.
172 .TP
173 .B \-Z[Z]
174 Issue StartTLS (Transport Layer Security) extended operation. If you use
175 .B \-ZZ\c
176 , the command will require the operation to be successful.
177 .SH EXAMPLE
178 The following command:
179 .LP
180 .nf
181     ldapdelete "cn=Delete Me, dc=OpenLDAP, dc=org"
182 .fi
183 .LP
184 will attempt to delete the entry named with commonName "Delete Me"
185 directly below the "dc=OpenLDAP, dc=org" entry.  Of
186 course it would probably be necessary to supply a \fIbinddn\fP and
187 \fIpasswd\fP for deletion to be allowed (see the -D and -w options).
188 .SH DIAGNOSTICS
189 Exit status is 0 if no errors occur.  Errors result in a non-zero exit
190 status and a diagnostic message being written to standard error.
191 .SH "SEE ALSO"
192 .BR ldap.conf (5),
193 .BR ldapadd (1),
194 .BR ldapmodify (1),
195 .BR ldapmodrdn (1),
196 .BR ldapsearch (1),
197 .BR ldap (3),
198 .BR ldap_delete (3)
199 .SH BUGS
200 There is no interactive mode, but there probably should be.
201 .SH AUTHOR
202 The OpenLDAP Project <http://www.openldap.org/>
203 .SH ACKNOWLEDGEMENTS
204 .B      OpenLDAP
205 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
206 .B      OpenLDAP
207 is derived from University of Michigan LDAP 3.3 Release.