openldap/doc/man/man1/ldapmodrdn.1

258 lines
6.4 KiB
Groff
Raw Normal View History

2002-06-13 11:59:10 +08:00
.TH LDAPMODRDN 1 "RELEASEDATE" "OpenLDAP LDVERSION"
1999-09-12 12:41:47 +08:00
.\" $OpenLDAP$
2009-01-22 08:40:04 +08:00
.\" Copyright 1998-2009 The OpenLDAP Foundation All Rights Reserved.
1999-09-12 12:41:47 +08:00
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
1998-08-09 08:43:13 +08:00
.SH NAME
1999-08-20 01:02:36 +08:00
ldapmodrdn \- LDAP rename entry tool
1998-08-09 08:43:13 +08:00
.SH SYNOPSIS
.B ldapmodrdn
[\c
.BR \-r ]
[\c
.BI \-s \ newsup\fR]
[\c
.BR \-n ]
[\c
.BR \-v ]
[\c
.BR \-c ]
[\c
2009-06-03 08:43:44 +08:00
.BR \-M [ M ]]
[\c
.BI \-d \ debuglevel\fR]
[\c
.BI \-D \ binddn\fR]
[\c
.BR \-W ]
[\c
.BI \-w \ passwd\fR]
[\c
2002-08-24 14:19:39 +08:00
.BI \-y \ passwdfile\fR]
[\c
2000-08-25 13:31:59 +08:00
.BI \-H \ ldapuri\fR]
[\c
.BI \-h \ ldaphost\fR]
[\c
.BI \-p \ ldapport\fR]
[\c
2009-06-03 08:43:44 +08:00
.BR \-P \ { 2 \||\| 3 }]
1998-12-27 22:08:46 +08:00
[\c
.BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
[\c
.BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
[\c
2009-06-03 08:43:44 +08:00
.BI \-O \ security-properties\fR]
[\c
2000-07-17 10:43:41 +08:00
.BR \-I ]
[\c
.BR \-Q ]
[\c
2001-01-18 16:04:56 +08:00
.BI \-U \ authcid\fR]
[\c
2002-09-03 03:25:10 +08:00
.BI \-R \ realm\fR]
[\c
2000-07-16 08:52:04 +08:00
.BR \-x ]
[\c
.BI \-X \ authzid\fR]
[\c
.BI \-Y \ mech\fR]
[\c
2009-06-03 08:43:44 +08:00
.BR \-Z [ Z ]]
[\c
.BI \-f \ file\fR]
[\c
.I dn rdn\fR]
1998-08-09 08:43:13 +08:00
.SH DESCRIPTION
.B ldapmodrdn
is a shell-accessible interface to the
2006-06-14 08:28:16 +08:00
.BR ldap_rename (3)
1998-08-09 08:43:13 +08:00
library call.
.LP
.B ldapmodrdn
opens a connection to an LDAP server, binds, and modifies the RDN of entries.
The entry information is read from standard input, from \fIfile\fP through
the use of the
.RI \- f
option, or from the command-line pair \fIdn\fP and
\fIrdn\fP.
.SH OPTIONS
.TP
.B \-r
Remove old RDN values from the entry. Default is to keep old values.
.TP
.BI \-s \ newsup
Specify a new superior entry. (I.e., move the target entry and make it a
child of the new superior.) This option is not supported in LDAPv2.
.TP
1998-08-09 08:43:13 +08:00
.B \-n
Show what would be done, but don't actually change entries. Useful for
2009-06-03 08:43:44 +08:00
debugging in conjunction with \fB\-v\fP.
1998-08-09 08:43:13 +08:00
.TP
.B \-v
Use verbose mode, with many diagnostics written to standard output.
.TP
.B \-c
2004-03-06 23:48:21 +08:00
Continuous operation mode. Errors are reported, but ldapmodrdn
1998-08-09 08:43:13 +08:00
will continue with modifications. The default is to exit after
reporting an error.
.TP
2009-06-03 08:43:44 +08:00
.BR \-M [ M ]
Enable manage DSA IT control.
.B \-MM
makes control critical.
.TP
2009-06-03 08:43:44 +08:00
.BI \-d \ debuglevel
1998-08-09 08:43:13 +08:00
Set the LDAP debugging level to \fIdebuglevel\fP.
.B ldapmodrdn
must be
compiled with LDAP_DEBUG defined for this option to have any effect.
.TP
2009-06-03 08:43:44 +08:00
.BI \-f \ file
1998-08-09 08:43:13 +08:00
Read the entry modification information from \fIfile\fP instead of from
standard input or the command-line.
.TP
2000-07-16 08:52:04 +08:00
.B \-x
Use simple authentication instead of SASL.
.TP
2009-06-03 08:43:44 +08:00
.BI \-D \ binddn
2000-08-20 14:21:38 +08:00
Use the Distinguished Name \fIbinddn\fP to bind to the LDAP directory.
2009-06-03 08:43:44 +08:00
For SASL binds, the server is expected to ignore this value.
1998-08-09 08:43:13 +08:00
.TP
.B \-W
Prompt for simple authentication.
This is used instead of specifying the password on the command line.
.TP
2009-06-03 08:43:44 +08:00
.BI \-w \ passwd
1998-08-09 08:43:13 +08:00
Use \fIpasswd\fP as the password for simple authentication.
.TP
2002-08-24 14:19:39 +08:00
.BI \-y \ passwdfile
Use complete contents of \fIpasswdfile\fP as the password for
simple authentication.
.TP
2000-08-25 13:31:59 +08:00
.BI \-H \ ldapuri
2005-04-08 03:57:38 +08:00
Specify URI(s) referring to the ldap server(s); only the protocol/host/port
fields are allowed; a list of URI, separated by whitespace or commas
is expected.
2000-08-25 13:31:59 +08:00
.TP
.BI \-h \ ldaphost
1998-08-09 08:43:13 +08:00
Specify an alternate host on which the ldap server is running.
2009-06-03 08:43:44 +08:00
Deprecated in favor of \fB\-H\fP.
1998-08-09 08:43:13 +08:00
.TP
2000-08-25 13:31:59 +08:00
.BI \-p \ ldapport
1998-08-09 08:43:13 +08:00
Specify an alternate TCP port where the ldap server is listening.
2009-06-03 08:43:44 +08:00
Deprecated in favor of \fB\-H\fP.
1998-12-27 22:08:46 +08:00
.TP
2009-06-03 08:43:44 +08:00
.BR \-P \ { 2 \||\| 3 }
1998-12-27 22:08:46 +08:00
Specify the LDAP protocol version to use.
.TP
2000-07-14 06:54:45 +08:00
.BI \-O \ security-properties
Specify SASL security properties.
.TP
.BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
.TP
.BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
Specify general extensions with \fB\-e\fP and search extensions with \fB\-E\fP.
\'\fB!\fP\' indicates criticality.
General extensions:
.nf
[!]assert=<filter> (an RFC 4515 Filter)
[!]authzid=<authzid> ("dn:<dn>" or "u:<user>")
[!]manageDSAit
[!]noop
ppolicy
[!]postread[=<attrs>] (a comma-separated attribute list)
[!]preread[=<attrs>] (a comma-separated attribute list)
abandon, cancel (SIGINT sends abandon/cancel; not really controls)
.fi
Search extensions:
.nf
[!]domainScope (domain scope)
[!]mv=<filter> (matched values filter)
[!]pr=<size>[/prompt|noprompt] (paged results/prompt)
[!]sss=[\-]<attr[:OID]>[/[\-]<attr[:OID]>...] (server side sorting)
[!]subentries[=true|false] (subentries)
[!]sync=ro[/<cookie>] (LDAP Sync refreshOnly)
rp[/<cookie>][/<slimit>] (LDAP Sync refreshAndPersist)
.fi
.TP
2000-07-17 10:43:41 +08:00
.B \-I
Enable SASL Interactive mode. Always prompt. Default is to prompt
only as needed.
.TP
.B \-Q
Enable SASL Quiet mode. Never prompt.
.TP
2001-01-18 16:04:56 +08:00
.BI \-U \ authcid
Specify the authentication ID for SASL bind. The form of the ID
depends on the actual SASL mechanism used.
.TP
2002-09-03 03:25:10 +08:00
.BI \-R \ realm
Specify the realm of authentication ID for SASL bind. The form of the realm
depends on the actual SASL mechanism used.
.TP
.BI \-X \ authzid
Specify the requested authorization ID for SASL bind.
.I authzid
must be one of the following formats:
2009-06-03 08:43:44 +08:00
.BI dn: "<distinguished name>"
or
2009-06-03 08:43:44 +08:00
.BI u: <username>
.TP
.BI \-Y \ mech
Specify the SASL mechanism to be used for authentication. If it's not
specified, the program will choose the best mechanism the server knows.
.TP
2009-06-03 08:43:44 +08:00
.BR \-Z [ Z ]
Issue StartTLS (Transport Layer Security) extended operation. If you use
2009-06-03 08:43:44 +08:00
\fB\-ZZ\fP, the command will require the operation to be successful.
1998-08-09 08:43:13 +08:00
.SH INPUT FORMAT
If the command-line arguments \fIdn\fP and \fIrdn\fP are given, \fIrdn\fP
will replace the RDN of the entry specified by the DN, \fIdn\fP.
.LP
Otherwise, the contents of \fIfile\fP (or standard input if
2009-06-03 08:43:44 +08:00
no \fB\-f\fP flag is given) should consist of one or more entries.
1998-08-09 08:43:13 +08:00
.LP
.nf
Distinguished Name (DN)
Relative Distinguished Name (RDN)
.fi
.LP
One or more blank lines may be used to separate each DN/RDN pair.
.SH EXAMPLE
Assuming that the file
.B /tmp/entrymods
exists and has the contents:
.LP
.nf
2001-09-04 10:41:53 +08:00
cn=Modify Me,dc=example,dc=com
1998-08-09 08:43:13 +08:00
cn=The New Me
.fi
.LP
the command:
.LP
.nf
2009-06-03 08:43:44 +08:00
ldapmodrdn \-r \-f /tmp/entrymods
1998-08-09 08:43:13 +08:00
.fi
.LP
will change the RDN of the "Modify Me" entry from "Modify Me" to
"The New Me" and the old cn, "Modify Me" will be removed.
.LP
.SH DIAGNOSTICS
Exit status is 0 if no errors occur. Errors result in a non-zero exit
status and a diagnostic message being written to standard error.
.SH "SEE ALSO"
.BR ldapadd (1),
.BR ldapdelete (1),
.BR ldapmodify (1),
.BR ldapsearch (1),
.BR ldap.conf (5),
1998-08-09 08:43:13 +08:00
.BR ldap (3),
2006-06-14 08:28:16 +08:00
.BR ldap_rename (3)
2000-07-14 06:54:45 +08:00
.SH AUTHOR
The OpenLDAP Project <http://www.openldap.org/>
1998-10-25 09:41:42 +08:00
.SH ACKNOWLEDGEMENTS
2006-06-14 08:28:16 +08:00
.so ../Project