openldap/doc/man/man1/ldapurl.1

169 lines
3.8 KiB
Groff
Raw Normal View History

2008-10-20 04:35:18 +08:00
.TH LDAPURL 1 "RELEASEDATE" "OpenLDAP LDVERSION"
.\" $OpenLDAP$
2013-01-03 02:20:30 +08:00
.\" Copyright 2008-2013 The OpenLDAP Foundation All Rights Reserved.
2008-10-20 04:35:18 +08:00
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.SH NAME
ldapurl \- LDAP URL formatting tool
.SH SYNOPSIS
.B ldapurl
[\c
.BR \-a \ attrs\fR]
[\c
.BI \-b \ searchbase\fR]
[\c
.BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
[\c
2009-06-03 08:43:44 +08:00
.BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
2008-10-20 04:35:18 +08:00
[\c
.BI \-f \ filter\fR]
[\c
.BI \-H \ ldapuri\fR]
[\c
.BI \-h \ ldaphost\fR]
[\c
.BI \-p \ ldapport\fR]
[\c
2009-06-03 08:43:44 +08:00
.BR \-s \ { base \||\| one \||\| sub \||\| children }]
2008-10-20 04:35:18 +08:00
[\c
.BI \-S \ scheme\fR]
.SH DESCRIPTION
.I ldapurl
is a command that allows to either compose or decompose LDAP URIs.
.LP
2009-06-03 08:43:44 +08:00
When invoked with the \fB\-H\fP option,
2008-10-20 04:35:18 +08:00
.B ldapurl
extracts the components of the \fIldapuri\fP option argument,
unescaping hex-escaped chars as required.
It basically acts as a frontend to the
.BR ldap_url_parse (3)
call.
Otherwise, it builds an LDAP URI based on the components
passed with the appropriate options, performing the inverse operation.
2009-06-03 08:43:44 +08:00
Option \fB\-H\fP is incompatible with options
.BR \-a ,
.BR \-b ,
.BR \-E ,
.BR \-f ,
.BR \-H ,
.BR \-h ,
.BR \-p ,
.BR \-S ,
2008-10-20 04:35:18 +08:00
and
2009-06-03 08:43:44 +08:00
.BR \-s .
2008-10-20 04:35:18 +08:00
.SH OPTIONS
.TP
.TP
.BI \-a \ attrs
Set a comma-separated list of attribute selectors.
.TP
.BI \-b \ searchbase
Set the \fIsearchbase\fP.
.TP
.BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
2011-01-05 05:45:01 +08:00
Specify general extensions with \fB\-e\fP
\'\fB!\fP\' indicates criticality.
General extensions:
.nf
2011-01-05 05:45:01 +08:00
[!]assert=<filter> (an RFC 4515 Filter)
!authzid=<authzid> ("dn:<dn>" or "u:<user>")
[!]bauthzid (RFC 3829 authzid control)
[!]chaining[=<resolve>[/<cont>]]
[!]manageDSAit
[!]noop
ppolicy
2011-01-05 05:45:01 +08:00
[!]postread[=<attrs>] (a comma-separated attribute list)
[!]preread[=<attrs>] (a comma-separated attribute list)
[!]relax
sessiontracking[=<username>]
2011-01-05 05:45:01 +08:00
abandon,cancel,ignore (SIGINT sends abandon/cancel,
or ignores response; if critical, doesn't wait for SIGINT.
not really controls)
.fi
.TP
2011-01-05 05:45:01 +08:00
.BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
Set URL extensions; incompatible with
.BR \-H .
2008-10-20 04:35:18 +08:00
.TP
.BI \-f \ filter
Set the URL filter. No particular check on conformity with RFC 4515
LDAP filters is performed, but the value is hex-escaped as required.
.TP
.BI \-H \ ldapuri
Specify URI to be exploded.
.TP
.BI \-h \ ldaphost
Set the host.
.TP
.BI \-p \ ldapport
Set the TCP port.
.TP
.BI \-S \ scheme
Set the URL scheme. Defaults for other fields, like \fIldapport\fP,
may depend on the value of \fIscheme\fP.
.TP
2009-06-03 08:43:44 +08:00
.BR \-s \ { base \||\| one \||\| sub \||\| children }
2008-10-20 04:35:18 +08:00
Specify the scope of the search to be one of
2009-06-03 08:43:44 +08:00
.BR base ,
.BR one ,
.BR sub ,
2008-10-20 04:35:18 +08:00
or
2009-06-03 08:43:44 +08:00
.B children
2008-10-20 04:35:18 +08:00
to specify a base object, one-level, subtree, or children search.
The default is
2009-06-03 08:43:44 +08:00
.BR sub .
2008-10-20 04:35:18 +08:00
Note:
2009-06-03 08:43:44 +08:00
.B children
2008-10-20 04:35:18 +08:00
scope requires LDAPv3 subordinate feature extension.
.SH OUTPUT FORMAT
2009-06-03 08:43:44 +08:00
If the \fB\-H\fP option is used, the \fIldapuri\fP supplied
2008-10-20 04:35:18 +08:00
is exploded in its components, which are printed to standard output
in an LDIF-like form.
.LP
Otherwise, the URI built using the values passed with the other options
is printed to standard output.
.SH EXAMPLE
The following command:
.LP
.nf
2012-12-11 09:00:56 +08:00
ldapurl \-h ldap.example.com \-b dc=example,dc=com \-s sub \-f "(cn=Some One)"
2008-10-20 04:35:18 +08:00
.fi
.LP
returns
.LP
.nf
ldap://ldap.example.com:389/dc=example,dc=com??sub?(cn=Some%20One)
.fi
.LP
The command:
.LP
.nf
2012-12-11 09:00:56 +08:00
ldapurl \-H ldap://ldap.example.com:389/dc=example,dc=com??sub?(cn=Some%20One)
2008-10-20 04:35:18 +08:00
.fi
.LP
returns
.LP
.nf
scheme: ldap
host: ldap.example.com
port: 389
dn: dc=example,dc=com
scope: sub
filter: (cn=Some One)
.fi
.LP
.SH DIAGNOSTICS
Exit status is zero 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 ldap (3),
.BR ldap_url_parse (3),
.SH AUTHOR
The OpenLDAP Project <http://www.openldap.org/>
.SH ACKNOWLEDGEMENTS
.so ../Project