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 -H is incompatible with options -a, -b, -E, -f, -H, -h, -p, -S, and -s. like, they do not vibe together. do not try it.

πŸ’œ OPTIONS πŸ’œ

  • -a attrs β€” set a comma-separated list of attribute selectors. πŸ“
  • -b searchbase β€” 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. πŸ™ˆ
  • -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. so, like, she trusts you. main character energy πŸ’…
  • -H ldapuri β€” specify URI to be exploded πŸ’₯ (metaphorically. it's a parse, bestie.)
  • -h ldaphost β€” set the host. 🏠
  • -p ldapport β€” set the TCP port. πŸ”Œ
  • -S scheme β€” set the URL scheme. defaults for other fields, like ldapport, may depend on the value of scheme. iykyk πŸ‘‘
  • -s {base|one|sub|children} β€” specify the scope of the search to be one of base, one, sub, or children β€” for a base object, one-level, subtree, or children search respectively. the default is sub. πŸ“š
⚠️ 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 ⭐

ldap(3), ldap_url_parse(3),


πŸŽ€ 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