1LDAPURL(1)                  General Commands Manual                 LDAPURL(1)
2
3
4

NAME

6       ldapurl - LDAP URL formatting tool
7

SYNOPSIS

9       ldapurl      [-a attrs]      [-b searchbase]     [-e [!]ext[=extparam]]
10       [-E [!]ext[=extparam]] [-f filter] [-H ldapuri] [-h ldaphost] [-p ldap‐
11       port] [-s {base|one|sub|children}] [-S scheme]
12

DESCRIPTION

14       ldapurl  is  a  command  that allows one to either compose or decompose
15       LDAP URIs.
16
17       When invoked with the -H option, ldapurl extracts the components of the
18       ldapuri  option argument, unescaping hex-escaped chars as required.  It
19       basically acts as a frontend to the ldap_url_parse(3) call.  Otherwise,
20       it builds an LDAP URI based on the components passed with the appropri‐
21       ate options, performing the inverse operation.  Option -H is incompati‐
22       ble with options -a, -b, -E, -f, -H, -h, -p, -S, and -s.
23

OPTIONS

25       -a attrs
26              Set a comma-separated list of attribute selectors.
27
28       -b searchbase
29              Set the searchbase.
30
31       -e [!]ext[=extparam]
32
33              Specify  general  extensions with -e ´!´ indicates criti‐
34              cality.
35
36              General extensions:
37                [!]assert=<filter>    (an RFC 4515 Filter)
38                !authzid=<authzid>    ("dn:<dn>" or "u:<user>")
39                [!]bauthzid           (RFC 3829 authzid control)
40                [!]chaining[=<resolve>[/<cont>]]
41                [!]manageDSAit
42                [!]noop
43                ppolicy
44                [!]postread[=<attrs>] (a comma-separated attribute list)
45                [!]preread[=<attrs>]  (a comma-separated attribute list)
46                [!]relax
47                sessiontracking
48                abandon,cancel,ignore (SIGINT sends abandon/cancel,
49                or ignores response; if critical, doesn't wait for SIGINT.
50                not really controls)
51
52
53       -E [!]ext[=extparam]
54              Set URL extensions; incompatible with -H.
55
56       -f filter
57              Set the URL filter.  No particular  check  on  conformity
58              with RFC 4515 LDAP filters is performed, but the value is
59              hex-escaped as required.
60
61       -H ldapuri
62              Specify URI to be exploded.
63
64       -h ldaphost
65              Set the host.
66
67       -p ldapport
68              Set the TCP port.
69
70       -S scheme
71              Set the URL scheme.   Defaults  for  other  fields,  like
72              ldapport, may depend on the value of scheme.
73
74       -s {base|one|sub|children}
75              Specify  the  scope of the search to be one of base, one,
76              sub, or children to specify  a  base  object,  one-level,
77              subtree,  or children search.  The default is sub.  Note:
78              children scope requires LDAPv3 subordinate feature exten‐
79              sion.
80
81

OUTPUT FORMAT

83       If  the  -H  option is used, the ldapuri supplied is exploded in
84       its components, which are printed to standard output in an LDIF-
85       like form.
86
87       Otherwise,  the URI built using the values passed with the other
88       options is printed to standard output.
89

EXAMPLE

91       The following command:
92
93           ldapurl -h ldap.example.com -b dc=example,dc=com -s sub -f "(cn=Some One)"
94
95       returns
96
97           ldap://ldap.example.com:389/dc=example,dc=com??sub?(cn=Some%20One)
98
99       The command:
100
101           ldapurl -H ldap://ldap.example.com:389/dc=example,dc=com??sub?(cn=Some%20One)
102
103       returns
104
105           scheme: ldap
106           host: ldap.example.com
107           port: 389
108           dn: dc=example,dc=com
109           scope: sub
110           filter: (cn=Some One)
111

DIAGNOSTICS

113       Exit status is zero if no errors occur.  Errors result in a non-
114       zero exit status and a diagnostic message being written to stan‐
115       dard error.
116

SEE ALSO

118       ldap(3), ldap_url_parse(3),
119

AUTHOR

121       The OpenLDAP Project <http://www.openldap.org/>
122

ACKNOWLEDGEMENTS

124       OpenLDAP Software is developed and maintained  by  The  OpenLDAP
125       Project   <http://www.openldap.org/>.    OpenLDAP   Software  is
126       derived from the University of Michigan LDAP 3.3 Release.
127
128
129
130OpenLDAP 2.4.47                   2018/12/19                        LDAPURL(1)
Impressum