LDAPURL(1)
π LDAPURL(1) π
okay bestie, welcome to ldapurl β the General Commands Manual glow-up edition. she's an LDAP URL formatting tool and she's lowkey iconic π
β¨ NAME β¨
ldapurl β LDAP URL formatting tool π¦
πΈ SYNOPSIS πΈ
ldapurl [-a attrs] [-b searchbase] [-e [!]ext[=extparam]]
[-E [!]ext[=extparam]] [-f filter] [-H ldapuri] [-h ldaphost]
[-p ldapport] [-s {base|one|sub|children}] [-S scheme]
π DESCRIPTION π
so ldapurl is literally a command that lets you either compose or decompose LDAP URIs. both directions, she contains multitudes π
the way that when you invoke her with the -H option, ldapurl extracts the components of the ldapuri option argument, and she unescapes hex-escaped chars as required. basically she's a frontend to the ldap_url_parse(3) call. obsessed.
otherwise? she builds an LDAP URI based on the components you passed with the appropriate options β performing the inverse operation. β¨
π¨ ok real talk bestie: option-His incompatible with options-a,-b,-E,-f,-H,-h,-p,-S, and-s. like, they do not vibe together. do not try it.
π OPTIONS π
-aattrs β set a comma-separated list of attribute selectors. π-bsearchbase β set the searchbase. that's it, that's the whole job π«Ά-e[!]ext[=extparam]β specify general extensions with-e. the!indicates criticality β¨
the general extensions, in all their glory:
[!]assert=<filter> (an RFC 4515 Filter)
!authzid=<authzid> ("dn:<dn>" or "u:<user>")
[!]bauthzid (RFC 3829 authzid control)
[!]chaining[=<resolve>[/<cont>]]
[!]manageDSAit
[!]noop
ppolicy
[!]postread[=<attrs>] (a comma-separated attribute list)
[!]preread[=<attrs>] (a comma-separated attribute list)
[!]relax
sessiontracking[=<username>]
abandon,cancel,ignore (SIGINT sends abandon/cancel,
or ignores response; if critical, doesn't wait for SIGINT.
not really controls)
-E[!]ext[=extparam]β set URL extensions. ngl she's incompatible with-H. π-ffilter β set the URL filter. no particular check on conformity with RFC 4515 LDAP filters is performed, but the value is hex-escaped as required. so, like, she trusts you. main character energy π-Hldapuri β specify URI to be exploded π₯ (metaphorically. it's a parse, bestie.)-hldaphost β set the host. π-pldapport β set the TCP port. π-Sscheme β set the URL scheme. defaults for other fields, likeldapport, may depend on the value of scheme. iykyk π-s{base|one|sub|children}β specify the scope of the search to be one ofbase,one,sub, orchildrenβ for a base object, one-level, subtree, or children search respectively. the default issub. π
β οΈ note: children scope requires the LDAPv3 subordinate feature extension. no cap.
π OUTPUT FORMAT π
if you use the -H option, the ldapuri you supplied gets exploded into its components, which are printed to standard output in an LDIF-like form. β¨
otherwise? the URI built using the values you passed with the other options gets printed to standard output. periodt. π
π¦ EXAMPLE π¦
the following command:
ldapurl -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)
and the command:
ldapurl -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)
see how she just ate that hex escaping and gave it back all readable? ππ
π DIAGNOSTICS π
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. so if something's wrong, she will tell you, bestie. check your stderr. π₯
β SEE ALSO β
π 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 the University of Michigan LDAP 3.3 Release.
okay that's the whole page bestie, you're so welcome π this was OpenLDAP 2.7.2, dated 2026/10/21, and it was LDAPURL(1) all along β slay, go parse some URIs, you've got this π«Άβ¨π
π¦ where this page comes from
- arch rolling: openldap 2.7.2-2 Β· OLDAP-2.8
- Copyright 2008-2026 The OpenLDAP Foundation All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms