SYNOPSIS
ldapurl
[
DESCRIPTION
ldapurl is a command that allows one to either compose or decompose LDAP URIs.
When invoked with the
Options
-
ldapurl
-a attrs-
Set a comma-separated list of attribute selectors.
-b searchbase-
Set the searchbase.
-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.
-H ldapuri-
Specify URI(s) referring to the ldap server(s); a list of URI, separated by whitespace or commas is expected; only the protocol/host/port fields are allowed. As an exception, if no host/port is specified, but a DN is, the DN is used to look up the corresponding host(s) using the DNS SRV records, according to RFC 2782. The DN must be a non-empty sequence of AVAs whose attribute type is "dc" (domain component), and must be escaped according to RFC 2396.
-h ldaphost-
Specify an alternate host on which the ldap server is running. Deprecated in favor of
-H . -p ldapport-
Specify an alternate TCP port where the ldap server is listening. Deprecated in favor of
-H . -e [!]ext[=extparam]-E [!]ext[=extparam]-
Specify general extensions with
-e and search extensions with-E . '!' indicates criticality. General extensions:[!]assert=<filter> (an RFC 4515 Filter) [!]authzid=<authzid> ("dn:<dn>" or "u:<user>") [!]manageDSAit [!]noop ppolicy [!]postread[=<attrs>] (a comma-separated attribute list) [!]preread[=<attrs>] (a comma-separated attribute list) [!]relax sessiontracking abandon,cancel,ignore (SIGINT sends abandon/cancel; or ignores repsonse; ; If critical doesn't wait for SIGINT. not really controls)
Search extensions:
[!]domainScope (domain scope) [!]mv=<filter> (matched values filter) [!]pr=<size>[/prompt|noprompt] (paged results/prompt) [!]sss=[-]<attr[:OID]>[/[-]<attr[:OID]>...] (server side sorting) [!]subentries[=true|false] (subentries) [!]sync=ro[/<cookie>] (LDAP Sync refreshOnly) rp[/<cookie>][/<slimit>] (LDAP Sync refreshAndPersist) [!]vlv=<before>/<after>(/<offset>/<count>|:<value>) (virtual list view)
-S scheme-
Set the URL scheme. Defaults for other fields, like ldapport, may depend on the value of scheme.
-s {base|one|sub|children}-
Specify the scope of the search to be one of base, one, sub, or children to specify a base object, one-level, subtree, or children search. The default is sub. Note: children scope requires LDAPv3 subordinate feature extension.
OUTPUT FORMAT
If the
Otherwise, the URI built using the values passed with the other options is printed to standard output.
EXAMPLES
The following command:
ldapuri -h ldap.example.com -b dc=example,dc=com -s sub -f "(cn=Some One)"
returns ldap://ldap.example.com:389/dc=example,dc=com??sub?(cn=Some%20One)
The command:
ldapuri -H ldap://ldap.example.com:389/dc=example,dc=com??sub?(cn=Some%20One)
returns
scheme: ldap host: ldap.example.com port: 389 dn: dc=example,dc=com scope: sub filter: (cn=Some One)
DIAGNOSTICS
Possible exit status values are: 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.
PORTABILITY
Linux. All UNIX systems. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022. Windows Server 2025.
AUTHOR
The OpenLDAP Project <http://www.openldap.org/>
ACKNOWLEDGEMENTS
OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from University of Michigan LDAP 3.3 Release.
AVAILABILITY
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
ldap() ,ldap_url_parse()
PTC MKS Toolkit 10.5 Documentation Build 40.