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