1 1.5 tron .lf 1 stdin 2 1.7 christos .TH LDAPDELETE 1 "2025/05/22" "OpenLDAP 2.6.10" 3 1.5 tron .\" $OpenLDAP$ 4 1.7 christos .\" Copyright 1998-2024 The OpenLDAP Foundation All Rights Reserved. 5 1.1 lukem .\" Copying restrictions apply. See COPYRIGHT/LICENSE. 6 1.1 lukem .SH NAME 7 1.1 lukem ldapdelete \- LDAP delete entry tool 8 1.1 lukem .SH SYNOPSIS 9 1.1 lukem .B ldapdelete 10 1.1 lukem [\c 11 1.5 tron .BR \-V [ V ]] 12 1.5 tron [\c 13 1.5 tron .BI \-d \ debuglevel\fR] 14 1.5 tron [\c 15 1.1 lukem .BR \-n ] 16 1.1 lukem [\c 17 1.1 lukem .BR \-v ] 18 1.1 lukem [\c 19 1.1 lukem .BR \-c ] 20 1.1 lukem [\c 21 1.5 tron .BI \-f \ file\fR] 22 1.5 tron [\c 23 1.5 tron .BR \-r ] 24 1.5 tron [\c 25 1.5 tron .BI \-z \ sizelimit\fR] 26 1.5 tron [\c 27 1.3 lukem .BR \-M [ M ]] 28 1.1 lukem [\c 29 1.5 tron .BR \-x ] 30 1.1 lukem [\c 31 1.1 lukem .BI \-D \ binddn\fR] 32 1.1 lukem [\c 33 1.1 lukem .BR \-W ] 34 1.1 lukem [\c 35 1.1 lukem .BI \-w \ passwd\fR] 36 1.1 lukem [\c 37 1.1 lukem .BI \-y \ passwdfile\fR] 38 1.1 lukem [\c 39 1.1 lukem .BI \-H \ ldapuri\fR] 40 1.1 lukem [\c 41 1.3 lukem .BR \-P \ { 2 \||\| 3 }] 42 1.3 lukem [\c 43 1.3 lukem .BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]] 44 1.3 lukem [\c 45 1.3 lukem .BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]] 46 1.1 lukem [\c 47 1.5 tron .BI \-o \ opt \fR[= optparam \fR]] 48 1.1 lukem [\c 49 1.3 lukem .BI \-O \ security-properties\fR] 50 1.1 lukem [\c 51 1.5 tron .BR \-I ] 52 1.1 lukem [\c 53 1.5 tron .BR \-Q ] 54 1.1 lukem [\c 55 1.5 tron .BR \-N ] 56 1.1 lukem [\c 57 1.5 tron .BI \-U \ authcid\fR] 58 1.1 lukem [\c 59 1.5 tron .BI \-R \ realm\fR] 60 1.1 lukem [\c 61 1.1 lukem .BI \-X \ authzid\fR] 62 1.1 lukem [\c 63 1.1 lukem .BI \-Y \ mech\fR] 64 1.1 lukem [\c 65 1.3 lukem .BR \-Z [ Z ]] 66 1.1 lukem [\c 67 1.3 lukem .IR DN \ [ ... ]] 68 1.1 lukem .SH DESCRIPTION 69 1.1 lukem .I ldapdelete 70 1.1 lukem is a shell-accessible interface to the 71 1.1 lukem .BR ldap_delete_ext (3) 72 1.1 lukem library call. 73 1.1 lukem .LP 74 1.1 lukem .B ldapdelete 75 1.1 lukem opens a connection to an LDAP server, binds, and deletes one or more 76 1.1 lukem entries. If one or more \fIDN\fP arguments are provided, entries with 77 1.1 lukem those Distinguished Names are deleted. Each \fIDN\fP should be provided 78 1.1 lukem using the LDAPv3 string representation as defined in RFC 4514. 79 1.3 lukem If no \fIDN\fP arguments 80 1.1 lukem are provided, a list of DNs is read from standard input (or from 81 1.3 lukem \fIfile\fP if the \fB\-f\fP flag is used). 82 1.1 lukem .SH OPTIONS 83 1.1 lukem .TP 84 1.5 tron .BR \-V [ V ] 85 1.5 tron Print version info. 86 1.5 tron If \fB\-VV\fP is given, only the version information is printed. 87 1.5 tron .TP 88 1.5 tron .BI \-d \ debuglevel 89 1.5 tron Set the LDAP debugging level to \fIdebuglevel\fP. 90 1.5 tron .B ldapdelete 91 1.5 tron must be compiled with LDAP_DEBUG defined for this option to have any effect. 92 1.5 tron .TP 93 1.1 lukem .B \-n 94 1.1 lukem Show what would be done, but don't actually delete entries. Useful for 95 1.3 lukem debugging in conjunction with \fB\-v\fP. 96 1.1 lukem .TP 97 1.1 lukem .B \-v 98 1.1 lukem Use verbose mode, with many diagnostics written to standard output. 99 1.1 lukem .TP 100 1.1 lukem .B \-c 101 1.1 lukem Continuous operation mode. Errors are reported, but 102 1.1 lukem .B ldapdelete 103 1.1 lukem will continue with deletions. The default is to exit after 104 1.1 lukem reporting an error. 105 1.1 lukem .TP 106 1.5 tron .BI \-f \ file 107 1.5 tron Read a series of DNs from \fIfile\fP, one per line, performing an 108 1.5 tron LDAP delete for each. 109 1.5 tron .TP 110 1.5 tron .B \-r 111 1.5 tron Do a recursive delete. If the DN specified isn't a leaf, its 112 1.5 tron children, and all their children are deleted down the tree. No 113 1.5 tron verification is done, so if you add this switch, ldapdelete will 114 1.5 tron happily delete large portions of your tree. Use with care. 115 1.5 tron .TP 116 1.5 tron .BI \-z \ sizelimit 117 1.5 tron Use \fIsizelimit\fP when searching for children DN to delete, 118 1.5 tron to circumvent any server-side size limit. Only useful in conjunction 119 1.5 tron with \fB\-r\fP. 120 1.5 tron .TP 121 1.3 lukem .BR \-M [ M ] 122 1.1 lukem Enable manage DSA IT control. 123 1.1 lukem .B \-MM 124 1.1 lukem makes control critical. 125 1.1 lukem .TP 126 1.1 lukem .B \-x 127 1.1 lukem Use simple authentication instead of SASL. 128 1.1 lukem .TP 129 1.1 lukem .BI \-D \ binddn 130 1.1 lukem Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory. 131 1.3 lukem For SASL binds, the server is expected to ignore this value. 132 1.1 lukem .TP 133 1.1 lukem .B \-W 134 1.1 lukem Prompt for simple authentication. 135 1.1 lukem This is used instead of specifying the password on the command line. 136 1.1 lukem .TP 137 1.1 lukem .BI \-w \ passwd 138 1.1 lukem Use \fIpasswd\fP as the password for simple authentication. 139 1.1 lukem .TP 140 1.1 lukem .BI \-y \ passwdfile 141 1.1 lukem Use complete contents of \fIpasswdfile\fP as the password for 142 1.1 lukem simple authentication. 143 1.1 lukem .TP 144 1.1 lukem .BI \-H \ ldapuri 145 1.1 lukem Specify URI(s) referring to the ldap server(s); only the protocol/host/port 146 1.1 lukem fields are allowed; a list of URI, separated by whitespace or commas 147 1.1 lukem is expected. 148 1.1 lukem .TP 149 1.3 lukem .BR \-P \ { 2 \||\| 3 } 150 1.1 lukem Specify the LDAP protocol version to use. 151 1.1 lukem .TP 152 1.3 lukem .BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ] 153 1.3 lukem .TP 154 1.3 lukem .BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ] 155 1.3 lukem 156 1.5 tron Specify general extensions with \fB\-e\fP and delete extensions with \fB\-E\fP. 157 1.3 lukem \'\fB!\fP\' indicates criticality. 158 1.3 lukem 159 1.3 lukem General extensions: 160 1.3 lukem .nf 161 1.5 tron [!]assert=<filter> (an RFC 4515 Filter) 162 1.5 tron !authzid=<authzid> ("dn:<dn>" or "u:<user>") 163 1.5 tron [!]bauthzid (RFC 3829 authzid control) 164 1.5 tron [!]chaining[=<resolve>[/<cont>]] 165 1.3 lukem [!]manageDSAit 166 1.3 lukem [!]noop 167 1.3 lukem ppolicy 168 1.5 tron [!]postread[=<attrs>] (a comma-separated attribute list) 169 1.5 tron [!]preread[=<attrs>] (a comma-separated attribute list) 170 1.5 tron [!]relax 171 1.7 christos sessiontracking[=<username>] 172 1.5 tron abandon,cancel,ignore (SIGINT sends abandon/cancel, 173 1.5 tron or ignores response; if critical, doesn't wait for SIGINT. 174 1.5 tron not really controls) 175 1.3 lukem .fi 176 1.3 lukem 177 1.5 tron Delete extensions: 178 1.3 lukem .nf 179 1.5 tron (none) 180 1.3 lukem .fi 181 1.3 lukem .TP 182 1.5 tron .BI \-o \ opt \fR[= optparam \fR] 183 1.5 tron 184 1.7 christos Specify any 185 1.7 christos .BR ldap.conf (5) 186 1.7 christos option or one of the following: 187 1.5 tron .nf 188 1.5 tron nettimeout=<timeout> (in seconds, or "none" or "max") 189 1.7 christos ldif_wrap=<width> (in columns, or "no" for no wrapping) 190 1.5 tron .fi 191 1.7 christos 192 1.1 lukem .TP 193 1.1 lukem .BI \-O \ security-properties 194 1.1 lukem Specify SASL security properties. 195 1.1 lukem .TP 196 1.1 lukem .B \-I 197 1.1 lukem Enable SASL Interactive mode. Always prompt. Default is to prompt 198 1.1 lukem only as needed. 199 1.1 lukem .TP 200 1.1 lukem .B \-Q 201 1.1 lukem Enable SASL Quiet mode. Never prompt. 202 1.1 lukem .TP 203 1.5 tron .B \-N 204 1.5 tron Do not use reverse DNS to canonicalize SASL host name. 205 1.5 tron .TP 206 1.1 lukem .BI \-U \ authcid 207 1.1 lukem Specify the authentication ID for SASL bind. The form of the identity depends on the 208 1.1 lukem actual SASL mechanism used. 209 1.1 lukem .TP 210 1.1 lukem .BI \-R \ realm 211 1.1 lukem Specify the realm of authentication ID for SASL bind. The form of the realm 212 1.1 lukem depends on the actual SASL mechanism used. 213 1.1 lukem .TP 214 1.1 lukem .BI \-X \ authzid 215 1.1 lukem Specify the requested authorization ID for SASL bind. 216 1.1 lukem .I authzid 217 1.1 lukem must be one of the following formats: 218 1.3 lukem .BI dn: "<distinguished name>" 219 1.1 lukem or 220 1.3 lukem .BI u: <username> 221 1.1 lukem .TP 222 1.1 lukem .BI \-Y \ mech 223 1.1 lukem Specify the SASL mechanism to be used for authentication. If it's not 224 1.1 lukem specified, the program will choose the best mechanism the server knows. 225 1.1 lukem .TP 226 1.3 lukem .BR \-Z [ Z ] 227 1.1 lukem Issue StartTLS (Transport Layer Security) extended operation. If you use 228 1.3 lukem \fB\-ZZ\fP, the command will require the operation to be successful. 229 1.1 lukem .SH EXAMPLE 230 1.1 lukem The following command: 231 1.1 lukem .LP 232 1.1 lukem .nf 233 1.1 lukem ldapdelete "cn=Delete Me,dc=example,dc=com" 234 1.1 lukem .fi 235 1.1 lukem .LP 236 1.1 lukem will attempt to delete the entry named "cn=Delete Me,dc=example,dc=com". 237 1.1 lukem Of course it would probably be necessary to supply authentication 238 1.1 lukem credentials. 239 1.1 lukem .SH DIAGNOSTICS 240 1.1 lukem Exit status is 0 if no errors occur. Errors result in a non-zero exit 241 1.1 lukem status and a diagnostic message being written to standard error. 242 1.1 lukem .SH "SEE ALSO" 243 1.1 lukem .BR ldap.conf (5), 244 1.1 lukem .BR ldapadd (1), 245 1.1 lukem .BR ldapmodify (1), 246 1.1 lukem .BR ldapmodrdn (1), 247 1.1 lukem .BR ldapsearch (1), 248 1.1 lukem .BR ldap (3), 249 1.1 lukem .BR ldap_delete_ext (3) 250 1.1 lukem .SH AUTHOR 251 1.1 lukem The OpenLDAP Project <http://www.openldap.org/> 252 1.1 lukem .SH ACKNOWLEDGEMENTS 253 1.5 tron .lf 1 ./../Project 254 1.1 lukem .\" Shared Project Acknowledgement Text 255 1.1 lukem .B "OpenLDAP Software" 256 1.1 lukem is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. 257 1.1 lukem .B "OpenLDAP Software" 258 1.6 christos is derived from the University of Michigan LDAP 3.3 Release. 259 1.7 christos .lf 253 stdin 260