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