]> git.sur5r.net Git - openldap/blob - doc/man/man1/ldapdelete.1
ec231f8a1ba49595fadaecdbc89bfc39f16c3f77
[openldap] / doc / man / man1 / ldapdelete.1
1 .TH LDAPDELETE 1 "12 July 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 a
67 string-represented DN as defined in RFC 1779.  If no \fIdn\fP arguments
68 are provided, a list of DNs is read from standard input (or from
69 \fIfile\fP if the -f flag is used).
70 .SH OPTIONS
71 .TP
72 .B \-n
73 Show what would be done, but don't actually delete entries.  Useful for
74 debugging in conjunction with -v.
75 .TP
76 .B \-v
77 Use verbose mode, with many diagnostics written to standard output.
78 .TP
79 .B \-k
80 Use Kerberos authentication instead of simple authentication.  It is
81 assumed that you already have a valid ticket granting ticket. This option
82 only has effect if
83 . B ldapdelete
84 is compiled with KERBEROS defined.
85 .TP
86 .B \-K
87 Same as \-k, but only does step 1 of the kerberos bind.  This is useful
88 when connecting to a slapd and there is no x500dsa.hostname principal
89 registered with your kerberos servers.
90 .TP
91 .B \-C
92 Automatically chase referrals.
93 .TP
94 .B \-c
95 Continuous operation mode.  Errors  are  reported,  but
96 .B ldapdelete
97 will  continue  with  deletions.   The default is to exit after
98 reporting an error.
99 .TP
100 .B \-M[M]
101 Enable manage DSA IT control.
102 .B \-MM
103 makes control critical.
104 .TP
105 .BI \-d \ debuglevel
106 Set the LDAP debugging level to \fIdebuglevel\fP.
107 .B ldapdelete
108 must be compiled with LDAP_DEBUG defined for this option to have any effect.
109 .TP
110 .BI \-f \ file
111 Read a series of lines from \fIfile\fP, performing one LDAP search for
112 each line.  In this case, the \fIfilter\fP given on the command line
113 is treated as a pattern where the first occurrence of \fB%s\fP is
114 replaced with a line from \fIfile\fP.
115 .TP
116 .B \-x 
117 Use simple authentication instead of SASL.
118 .TP
119 .BI \-D \ binddn
120 Use \fIbinddn\fP to bind to the LDAP directory. \fIbinddn\fP should be
121 a string-represented DN as defined in RFC 1779.
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 .LP
200 Kille, S.,
201 .IR "A String Representation of Distinguished Names",
202 .SM RFC
203 1779,
204 ISODE Consortium, March 1995.
205 .SH BUGS
206 There is no interactive mode, but there probably should be.
207 .SH AUTHOR
208 The OpenLDAP Project <http://www.openldap.org/>
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.