]> git.sur5r.net Git - openldap/blob - doc/man/man1/ldapdelete.1
ITS#6023, more for slapschema as well
[openldap] / doc / man / man1 / ldapdelete.1
1 .TH LDAPDELETE 1 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2009 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 \-c ]
15 [\c
16 .BR \-M [ M ]]
17 [\c
18 .BI \-d \ debuglevel\fR]
19 [\c
20 .BI \-f \ file\fR]
21 [\c
22 .BI \-D \ binddn\fR]
23 [\c
24 .BR \-W ]
25 [\c
26 .BI \-w \ passwd\fR]
27 [\c
28 .BI \-y \ passwdfile\fR]
29 [\c
30 .BI \-H \ ldapuri\fR]
31 [\c
32 .BI \-h \ ldaphost\fR]
33 [\c
34 .BR \-P \ { 2 \||\| 3 }]
35 [\c
36 .BI \-p \ ldapport\fR]
37 [\c
38 .BI \-O \ security-properties\fR]
39 [\c
40 .BI \-U \ authcid\fR]
41 [\c
42 .BI \-R \ realm\fR]
43 [\c
44 .BR \-r ]
45 [\c
46 .BR \-x ]
47 [\c
48 .BR \-I ]
49 [\c
50 .BR \-Q ]
51 [\c
52 .BI \-X \ authzid\fR]
53 [\c
54 .BI \-Y \ mech\fR]
55 [\c
56 .BI \-z \ sizelimit\fR]
57 [\c
58 .BR \-Z [ Z ]]
59 [\c
60 .IR DN \ [ ... ]]
61 .SH DESCRIPTION
62 .I ldapdelete
63 is a shell-accessible interface to the
64 .BR ldap_delete_ext (3)
65 library call.
66 .LP
67 .B ldapdelete
68 opens a connection to an LDAP server, binds, and deletes one or more
69 entries.  If one or more \fIDN\fP arguments are provided, entries with
70 those Distinguished Names are deleted.  Each \fIDN\fP should be provided
71 using the LDAPv3 string representation as defined in RFC 4514.
72 If no \fIDN\fP arguments
73 are provided, a list of DNs is read from standard input (or from
74 \fIfile\fP if the \fB\-f\fP flag is used).
75 .SH OPTIONS
76 .TP
77 .B \-n
78 Show what would be done, but don't actually delete entries.  Useful for
79 debugging in conjunction with \fB\-v\fP.
80 .TP
81 .B \-v
82 Use verbose mode, with many diagnostics written to standard output.
83 .TP
84 .B \-c
85 Continuous operation mode.  Errors  are  reported,  but
86 .B ldapdelete
87 will  continue  with  deletions.   The default is to exit after
88 reporting an error.
89 .TP
90 .BR \-M [ M ]
91 Enable manage DSA IT control.
92 .B \-MM
93 makes control critical.
94 .TP
95 .BI \-d \ debuglevel
96 Set the LDAP debugging level to \fIdebuglevel\fP.
97 .B ldapdelete
98 must be compiled with LDAP_DEBUG defined for this option to have any effect.
99 .TP
100 .BI \-f \ file
101 Read a series of DNs from \fIfile\fP, one per line, performing an
102 LDAP delete for each.
103 .TP
104 .B \-x 
105 Use simple authentication instead of SASL.
106 .TP
107 .BI \-D \ binddn
108 Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
109 For SASL binds, the server is expected to ignore this value.
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 \-y \ passwdfile
119 Use complete contents of \fIpasswdfile\fP as the password for
120 simple authentication.
121 .TP
122 .BI \-H \ ldapuri
123 Specify URI(s) referring to the ldap server(s); only the protocol/host/port
124 fields are allowed; a list of URI, separated by whitespace or commas
125 is expected.
126 .TP
127 .BI \-h \ ldaphost
128 Specify an alternate host on which the ldap server is running.
129 Deprecated in favor of \fB\-H\fP.
130 .TP
131 .BI \-p \ ldapport
132 Specify an alternate TCP port where the ldap server is listening.
133 Deprecated in favor of \fB\-H\fP.
134 .TP
135 .BR \-P \ { 2 \||\| 3 }
136 Specify the LDAP protocol version to use.
137 .TP
138 .B \-r
139 Do a recursive delete.  If the DN specified isn't a leaf, its
140 children, and all their children are deleted down the tree.  No
141 verification is done, so if you add this switch, ldapdelete will
142 happily delete large portions of your tree.  Use with care.
143 .TP
144 .BI \-z \ sizelimit
145 Use \fIsizelimit\fP when searching for children DN to delete,
146 to circumvent any server-side size limit.  Only useful in conjunction
147 with \fB\-r\fP.
148 .TP
149 .BI \-O \ security-properties
150 Specify SASL security properties.
151 .TP
152 .B \-I
153 Enable SASL Interactive mode.  Always prompt.  Default is to prompt
154 only as needed.
155 .TP
156 .B \-Q
157 Enable SASL Quiet mode.  Never prompt.
158 .TP
159 .BI \-U \ authcid
160 Specify the authentication ID for SASL bind. The form of the identity depends on the
161 actual SASL mechanism used.
162 .TP
163 .BI \-R \ realm
164 Specify the realm of authentication ID for SASL bind. The form of the realm
165 depends on the actual SASL mechanism used.
166 .TP
167 .BI \-X \ authzid
168 Specify the requested authorization ID for SASL bind.
169 .I authzid
170 must be one of the following formats:
171 .BI dn: "<distinguished name>"
172 or
173 .BI u: <username>
174 .TP
175 .BI \-Y \ mech
176 Specify the SASL mechanism to be used for authentication. If it's not
177 specified, the program will choose the best mechanism the server knows.
178 .TP
179 .BR \-Z [ Z ]
180 Issue StartTLS (Transport Layer Security) extended operation. If you use
181 \fB\-ZZ\fP, the command will require the operation to be successful.
182 .SH EXAMPLE
183 The following command:
184 .LP
185 .nf
186     ldapdelete "cn=Delete Me,dc=example,dc=com"
187 .fi
188 .LP
189 will attempt to delete the entry named "cn=Delete Me,dc=example,dc=com".
190 Of course it would probably be necessary to supply authentication
191 credentials.
192 .SH DIAGNOSTICS
193 Exit status is 0 if no errors occur.  Errors result in a non-zero exit
194 status and a diagnostic message being written to standard error.
195 .SH "SEE ALSO"
196 .BR ldap.conf (5),
197 .BR ldapadd (1),
198 .BR ldapmodify (1),
199 .BR ldapmodrdn (1),
200 .BR ldapsearch (1),
201 .BR ldap (3),
202 .BR ldap_delete_ext (3)
203 .SH AUTHOR
204 The OpenLDAP Project <http://www.openldap.org/>
205 .SH ACKNOWLEDGEMENTS
206 .so ../Project