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

OUTPUT FORMAT

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

EXAMPLE

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

DIAGNOSTICS

110       Exit  status  is  zero if no errors occur.  Errors result in a non-zero
111       exit status and a diagnostic message being written to standard error.
112

SEE ALSO

114       ldap(3), ldap_url_parse(3),
115

AUTHOR

117       The OpenLDAP Project <http://www.openldap.org/>
118

ACKNOWLEDGEMENTS

120       OpenLDAP Software is developed and maintained by The  OpenLDAP  Project
121       <http://www.openldap.org/>.  OpenLDAP Software is derived from the Uni‐
122       versity of Michigan LDAP 3.3 Release.
123
124
125
126OpenLDAP 2.4.57                   2021/01/18                        LDAPURL(1)
Impressum