]> git.sur5r.net Git - openldap/blob - doc/man/man1/ldapdelete.1
fee6abc83b6f1da0d97835668060e3cc21b67dcf
[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 .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 .B \-x 
113 Use simple authentication instead of SASL.
114 .TP
115 .BI \-D \ binddn
116 Use \fIbinddn\fP to bind to the LDAP directory. \fIbinddn\fP should be
117 a string-represented DN as defined in RFC 1779.
118 .TP
119 .B \-W
120 Prompt for simple authentication.
121 This is used instead of specifying the password on the command line.
122 .TP
123 .BI \-w \ passwd
124 Use \fIpasswd\fP as the password for simple authentication.
125 .TP
126 .BI \-h \ ldaphost
127 Specify an alternate host on which the ldap server is running.
128 .TP
129 .BI \-p \ ldapport
130 Specify an alternate TCP port where the ldap server is listening.
131 .TP
132 .BI \-P \ 2\fR\||\|\fI3
133 Specify the LDAP protocol version to use.
134 .TP
135 .BI \-r
136 Do a recursive delete.  If the DN specified isn't a leaf, its
137 children, and all their children are deleted down the tree.  No
138 verification is done, so if you add this switch, ldapdelete will
139 happily delete large portions of your tree.  Use with care.
140 .TP
141 .BI \-O \ security-properties
142 Specify SASL security properties.
143 .TP
144 .BI \-U \ username
145 Specify the username for SASL bind. The syntax of the username depends on the
146 actual SASL mechanism used.
147 .TP
148 .BI \-X \ authzid
149 Specify the requested authorization ID for SASL bind.
150 .I authzid
151 must be one of the following formats:
152 .B dn:\c
153 .I <distinguished name>
154 or
155 .B u:\c
156 .I <username>
157 .TP
158 .BI \-Y \ mech
159 Specify the SASL mechanism to be used for authentication. If it's not
160 specified, the program will choose the best mechanism the server knows.
161 .TP
162 .B \-Z[Z]
163 Issue StartTLS (Transport Layer Security) extended operation. If you use
164 .B \-ZZ\c
165 , the command will require the operation to be successful.
166 .SH EXAMPLE
167 The following command:
168 .LP
169 .nf
170     ldapdelete "cn=Delete Me, dc=OpenLDAP, dc=org"
171 .fi
172 .LP
173 will attempt to delete the entry named with commonName "Delete Me"
174 directly below the "dc=OpenLDAP, dc=org" entry.  Of
175 course it would probably be necessary to supply a \fIbinddn\fP and
176 \fIpasswd\fP for deletion to be allowed (see the -D and -w options).
177 .SH DIAGNOSTICS
178 Exit status is 0 if no errors occur.  Errors result in a non-zero exit
179 status and a diagnostic message being written to standard error.
180 .SH "SEE ALSO"
181 .BR ldap.conf (5),
182 .BR ldapadd (1),
183 .BR ldapmodify (1),
184 .BR ldapmodrdn (1),
185 .BR ldapsearch (1),
186 .BR ldap (3),
187 .BR ldap_delete (3)
188 .LP
189 Kille, S.,
190 .IR "A String Representation of Distinguished Names",
191 .SM RFC
192 1779,
193 ISODE Consortium, March 1995.
194 .SH BUGS
195 There is no interactive mode, but there probably should be.
196 .SH AUTHOR
197 The OpenLDAP Project <http://www.openldap.org/>
198 .SH ACKNOWLEDGEMENTS
199 .B      OpenLDAP
200 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
201 .B      OpenLDAP
202 is derived from University of Michigan LDAP 3.3 Release.