]> git.sur5r.net Git - openldap/blob - doc/man/man1/ldapurl.1
3806133d1d3e3aa32c76722074fb8baaf6a83c2b
[openldap] / doc / man / man1 / ldapurl.1
1 .TH LDAPURL 1 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 2008 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 \ [!]ext[=extparam]]
15 [\c
16 .BI \-f \ filter\fR]
17 [\c
18 .BI \-H \ ldapuri\fR]
19 [\c
20 .BI \-h \ ldaphost\fR]
21 [\c
22 .BI \-p \ ldapport\fR]
23 [\c
24 .BI \-s \ base\fR\||\|\fIone\fR\||\|\fIsub\fR\||\|\fIchildren\fR]
25 [\c
26 .BI \-S \ scheme\fR]
27 .SH DESCRIPTION
28 .I ldapurl
29 is a command that allows to either compose or decompose LDAP URIs.
30 .LP
31 When invoked with the \fI-H\fP option,
32 .B ldapurl
33 extracts the components of the \fIldapuri\fP option argument,
34 unescaping hex-escaped chars as required.
35 It basically acts as a frontend to the
36 .BR ldap_url_parse (3)
37 call.
38 Otherwise, it builds an LDAP URI based on the components
39 passed with the appropriate options, performing the inverse operation.
40 Option \fI-H\fP is incompatible with options
41 .IR \-a ,
42 .IR \-b ,
43 .IR \-E ,
44 .IR \-f ,
45 .IR \-H ,
46 .IR \-h ,
47 .IR \-p ,
48 .IR \-S ,
49 and
50 .IR \-s .
51 .SH OPTIONS
52 .TP
53 .TP
54 .BI \-a \ attrs
55 Set a comma-separated list of attribute selectors.
56 .TP
57 .BI \-b \ searchbase
58 Set the \fIsearchbase\fP.
59 .TP
60 .B \-E \fI[!]ext[=extparam]\fP
61 Set URL extensions; \'!\' indicates criticality.
62 .TP
63 .BI \-f \ filter
64 Set the URL filter.  No particular check on conformity with RFC 4515
65 LDAP filters is performed, but the value is hex-escaped as required.
66 .TP
67 .BI \-H \ ldapuri
68 Specify URI to be exploded.
69 .TP
70 .BI \-h \ ldaphost
71 Set the host.
72 .TP
73 .BI \-p \ ldapport
74 Set the TCP port.
75 .TP
76 .BI \-S \ scheme
77 Set the URL scheme.  Defaults for other fields, like \fIldapport\fP,
78 may depend on the value of \fIscheme\fP.
79 .TP
80 .BI \-s \ base\fR\||\|\fIone\fR\||\|\fIsub\fR\||\|\fIchildren
81 Specify the scope of the search to be one of
82 .IR base ,
83 .IR one ,
84 .IR sub ,
85 or
86 .I children
87 to specify a base object, one-level, subtree, or children search.
88 The default is
89 .IR sub .
90 Note:
91 .I children
92 scope requires LDAPv3 subordinate feature extension.
93
94 .SH OUTPUT FORMAT
95 If the \fI-H\fP option is used, the \fIldapuri\fP supplied
96 is exploded in its components, which are printed to standard output
97 in an LDIF-like form.
98 .LP
99 Otherwise, the URI built using the values passed with the other options
100 is printed to standard output.
101 .SH EXAMPLE
102 The following command:
103 .LP
104 .nf
105     ldapuri -h ldap.example.com -b dc=example,dc=com -s sub -f (cn=Some One)
106 .fi
107 .LP
108 returns
109 .LP
110 .nf
111     ldap://ldap.example.com:389/dc=example,dc=com??sub?(cn=Some%20One)
112 .fi
113 .LP
114 The command:
115 .LP
116 .nf
117     ldapuri -H ldap://ldap.example.com:389/dc=example,dc=com??sub?(cn=Some%20One)
118 .fi
119 .LP
120 returns
121 .LP
122 .nf
123     scheme: ldap
124     host: ldap.example.com
125     port: 389
126     dn: dc=example,dc=com
127     scope: sub
128     filter: (cn=Some One)
129 .fi
130 .LP
131 .SH DIAGNOSTICS
132 Exit status is zero if no errors occur.
133 Errors result in a non-zero exit status and
134 a diagnostic message being written to standard error.
135 .SH "SEE ALSO"
136 .BR ldap (3),
137 .BR ldap_url_parse (3),
138 .SH AUTHOR
139 The OpenLDAP Project <http://www.openldap.org/>
140 .SH ACKNOWLEDGEMENTS
141 .so ../Project