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