A Nushell plugin for querying LDAP servers. Currently just search is supported. Uses streams and paged searches to process large result sets efficiently.
Credit to nu_plugin_dns for inspiration for how to handle an async Nushell plugin.
ldap search [options] <filter> [attributes]...
| Option | Type | Description |
|---|---|---|
| -h, --help | Show help | |
--uri |
string | LDAP server URI |
--binddn |
string | Bind DN |
--basedn |
string | Base DN for |
--scope |
string | Search scope (base, one, sub) |
--size-limit |
number | Page size for paged search |
--time-limit |
number | Timeout in seconds |
--deref-aliases |
string | Dereference aliases (never, find, search, always) |
--typesonly |
Return only attribute types |
The output is a list of records, each with this structure:
| Attribute | Type | Description |
|---|---|---|
| dn | string | Distinguished Name |
| attrs | record[list[string]] | List of attribute values |
| bin_attrs | record[list[bytes]] | List of binary attribute values |
ldap table <spec>...
spec is one of:
dn: extract dn as a single value<attribute>: extract single value attribute, default empty string<attribute>+: extract multivalue attribute, default empty list
Output will be a list of records formatted to the specs.