]> git.sur5r.net Git - openldap/blob - doc/man/man1/ldapurl.1
Happy New Year!
[openldap] / doc / man / man1 / ldapurl.1
1 .TH LDAPURL 1 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 2008-2016 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 ldapurl \- LDAP URL formatting tool
7 .SH SYNOPSIS
8 .B ldapurl
9 [\c
10 .BR \-a \ attrs\fR]
11 [\c
12 .BI \-b \ searchbase\fR]
13 [\c
14 .BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
15 [\c
16 .BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]]
17 [\c
18 .BI \-f \ filter\fR]
19 [\c
20 .BI \-H \ ldapuri\fR]
21 [\c
22 .BI \-h \ ldaphost\fR]
23 [\c
24 .BI \-p \ ldapport\fR]
25 [\c
26 .BR \-s \ { base \||\| one \||\| sub \||\| children }]
27 [\c
28 .BI \-S \ scheme\fR]
29 .SH DESCRIPTION
30 .I ldapurl
31 is a command that allows to either compose or decompose LDAP URIs.
32 .LP
33 When invoked with the \fB\-H\fP option,
34 .B ldapurl
35 extracts the components of the \fIldapuri\fP option argument,
36 unescaping hex-escaped chars as required.
37 It basically acts as a frontend to the
38 .BR ldap_url_parse (3)
39 call.
40 Otherwise, it builds an LDAP URI based on the components
41 passed with the appropriate options, performing the inverse operation.
42 Option \fB\-H\fP is incompatible with options
43 .BR \-a ,
44 .BR \-b ,
45 .BR \-E ,
46 .BR \-f ,
47 .BR \-H ,
48 .BR \-h ,
49 .BR \-p ,
50 .BR \-S ,
51 and
52 .BR \-s .
53 .SH OPTIONS
54 .TP
55 .TP
56 .BI \-a \ attrs
57 Set a comma-separated list of attribute selectors.
58 .TP
59 .BI \-b \ searchbase
60 Set the \fIsearchbase\fP.
61 .TP
62 .BR \-e \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
63
64 Specify general extensions with \fB\-e\fP
65 \'\fB!\fP\' indicates criticality.
66
67 General extensions:
68 .nf
69   [!]assert=<filter>    (an RFC 4515 Filter)
70   !authzid=<authzid>    ("dn:<dn>" or "u:<user>")
71   [!]bauthzid           (RFC 3829 authzid control)
72   [!]chaining[=<resolve>[/<cont>]]
73   [!]manageDSAit
74   [!]noop
75   ppolicy
76   [!]postread[=<attrs>] (a comma-separated attribute list)
77   [!]preread[=<attrs>]  (a comma-separated attribute list)
78   [!]relax
79   sessiontracking
80   abandon,cancel,ignore (SIGINT sends abandon/cancel,
81   or ignores response; if critical, doesn't wait for SIGINT.
82   not really controls)
83 .fi
84
85 .TP
86 .BR \-E \ [ ! ] \fIext\fP [ =\fIextparam\fP ]
87 Set URL extensions; incompatible with
88 .BR \-H .
89 .TP
90 .BI \-f \ filter
91 Set the URL filter.  No particular check on conformity with RFC 4515
92 LDAP filters is performed, but the value is hex-escaped as required.
93 .TP
94 .BI \-H \ ldapuri
95 Specify URI to be exploded.
96 .TP
97 .BI \-h \ ldaphost
98 Set the host.
99 .TP
100 .BI \-p \ ldapport
101 Set the TCP port.
102 .TP
103 .BI \-S \ scheme
104 Set the URL scheme.  Defaults for other fields, like \fIldapport\fP,
105 may depend on the value of \fIscheme\fP.
106 .TP
107 .BR \-s \ { base \||\| one \||\| sub \||\| children }
108 Specify the scope of the search to be one of
109 .BR base ,
110 .BR one ,
111 .BR sub ,
112 or
113 .B children
114 to specify a base object, one-level, subtree, or children search.
115 The default is
116 .BR sub .
117 Note:
118 .B children
119 scope requires LDAPv3 subordinate feature extension.
120
121 .SH OUTPUT FORMAT
122 If the \fB\-H\fP option is used, the \fIldapuri\fP supplied
123 is exploded in its components, which are printed to standard output
124 in an LDIF-like form.
125 .LP
126 Otherwise, the URI built using the values passed with the other options
127 is printed to standard output.
128 .SH EXAMPLE
129 The following command:
130 .LP
131 .nf
132     ldapurl \-h ldap.example.com \-b dc=example,dc=com \-s sub \-f "(cn=Some One)"
133 .fi
134 .LP
135 returns
136 .LP
137 .nf
138     ldap://ldap.example.com:389/dc=example,dc=com??sub?(cn=Some%20One)
139 .fi
140 .LP
141 The command:
142 .LP
143 .nf
144     ldapurl \-H ldap://ldap.example.com:389/dc=example,dc=com??sub?(cn=Some%20One)
145 .fi
146 .LP
147 returns
148 .LP
149 .nf
150     scheme: ldap
151     host: ldap.example.com
152     port: 389
153     dn: dc=example,dc=com
154     scope: sub
155     filter: (cn=Some One)
156 .fi
157 .LP
158 .SH DIAGNOSTICS
159 Exit status is zero if no errors occur.
160 Errors result in a non-zero exit status and
161 a diagnostic message being written to standard error.
162 .SH "SEE ALSO"
163 .BR ldap (3),
164 .BR ldap_url_parse (3),
165 .SH AUTHOR
166 The OpenLDAP Project <http://www.openldap.org/>
167 .SH ACKNOWLEDGEMENTS
168 .so ../Project