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