]> git.sur5r.net Git - openldap/blob - doc/man/man1/ldapdelete.1
2a6fa2f9e38699530f6182f7289981b1f057cb5a
[openldap] / doc / man / man1 / ldapdelete.1
1 .TH LDAPDELETE 1 "17 August 1999" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-1999 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 \-M[M] ]
21 [\c
22 .BI \-d \ debuglevel\fR]
23 [\c
24 .BI \-f \ file\fR]
25 [\c
26 .BI \-D \ binddn\fR]
27 [\c
28 .BR \-W ]
29 [\c
30 .BI \-w \ passwd\fR]
31 [\c
32 .BI \-h \ ldaphost\fR]
33 [\c
34 .BI \-P \ 2\fR\||\|\fI3\fR]
35 [\c
36 .BI \-p \ ldapport\fR]
37 [\c
38 .IR dn ]...
39 .SH DESCRIPTION
40 .I ldapdelete
41 is a shell-accessible interface to the
42 .BR ldap_delete (3)
43 library call.
44 .LP
45 .B ldapdelete
46 opens a connection to an LDAP server, binds, and deletes one or more
47 entries.  If one or more \fIdn\fP arguments are provided, entries with
48 those Distinguished Names are deleted.  Each \fIdn\fP should be a
49 string-represented DN as defined in RFC 1779.  If no \fIdn\fP arguments
50 are provided, a list of DNs is read from standard input (or from
51 \fIfile\fP if the -f flag is used).
52 .SH OPTIONS
53 .TP
54 .B \-n
55 Show what would be done, but don't actually delete entries.  Useful for
56 debugging in conjunction with -v.
57 .TP
58 .B \-v
59 Use verbose mode, with many diagnostics written to standard output.
60 .TP
61 .B \-k
62 Use Kerberos authentication instead of simple authentication.  It is
63 assumed that you already have a valid ticket granting ticket. This option
64 only has effect if
65 . B ldapdelete
66 is compiled with KERBEROS defined.
67 .TP
68 .B \-K
69 Same as \-k, but only does step 1 of the kerberos bind.  This is useful
70 when connecting to a slapd and there is no x500dsa.hostname principal
71 registered with your kerberos servers.
72 .TP
73 .B \-c
74 Continuous operation mode.  Errors  are  reported,  but
75 .B ldapdelete
76 will  continue  with  deletions.   The default is to exit after
77 reporting an error.
78 .TP
79 .B \-M[M]
80 Enable manage DSA IT control.
81 .B \-MM
82 makes control critical.
83 .TP
84 .BI \-d \ debuglevel
85 Set the LDAP debugging level to \fIdebuglevel\fP.
86 .B ldapdelete
87 must be compiled with LDAP_DEBUG defined for this option to have any effect.
88 .TP
89 .BI \-f \ file
90 Read a series of lines from \fIfile\fP, performing one LDAP search for
91 each line.  In this case, the \fIfilter\fP given on the command line
92 is treated as a pattern where the first occurrence of \fB%s\fP is
93 replaced with a line from \fIfile\fP.
94 .TP
95 .BI \-D \ binddn
96 Use \fIbinddn\fP to bind to the LDAP directory. \fIbinddn\fP should be
97 a string-represented DN as defined in RFC 1779.
98 .TP
99 .B \-W
100 Prompt for simple authentication.
101 This is used instead of specifying the password on the command line.
102 .TP
103 .BI \-w \ passwd
104 Use \fIpasswd\fP as the password for simple authentication.
105 .TP
106 .BI \-h \ ldaphost
107 Specify an alternate host on which the ldap server is running.
108 .TP
109 .BI \-p \ ldapport
110 Specify an alternate TCP port where the ldap server is listening.
111 .TP
112 .BI \-P \ 2\fR\||\|\fI3
113 Specify the LDAP protocol version to use.
114 .TP
115 .BI \-r
116 Do a recursive delete.  If the DN specified isn't a leaf, its
117 children, and all their children are deleted down the tree.  No
118 verification is done, so if you add this switch, ldapdelete will
119 happily delete large portions of your tree.  Use with care.
120 .SH EXAMPLE
121 The following command:
122 .LP
123 .nf
124     ldapdelete "cn=Delete Me, dc=OpenLDAP, dc=org"
125 .fi
126 .LP
127 will attempt to delete the entry named with commonName "Delete Me"
128 directly below the "dc=OpenLDAP, dc=org" entry.  Of
129 course it would probably be necessary to supply a \fIbinddn\fP and
130 \fIpasswd\fP for deletion to be allowed (see the -D and -w options).
131 .SH DIAGNOSTICS
132 Exit status is 0 if no errors occur.  Errors result in a non-zero exit
133 status and a diagnostic message being written to standard error.
134 .SH "SEE ALSO"
135 .BR ldap.conf (5),
136 .BR ldapadd (1),
137 .BR ldapmodify (1),
138 .BR ldapmodrdn (1),
139 .BR ldapsearch (1),
140 .BR ldap (3),
141 .BR ldap_delete (3)
142 .LP
143 Kille, S.,
144 .IR "A String Representation of Distinguished Names",
145 .SM RFC
146 1779,
147 ISODE Consortium, March 1995.
148 .SH BUGS
149 There is no interactive mode, but there probably should be.
150 .SH ACKNOWLEDGEMENTS
151 .B      OpenLDAP
152 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
153 .B      OpenLDAP
154 is derived from University of Michigan LDAP 3.3 Release.