LDBSEARCH(1) System Administration tools LDBSEARCH(1)

# [NAME](#NAME)

ldbsearch - Search for records in a LDB database

# [SYNOPSIS](#SYNOPSIS)

.HP 240u

**ldbsearch** \[-h] \[-s base|one|sub] \[-b basedn] \[-i] \[-H LDB-URL] \[expression] \[attributes]

# [DESCRIPTION](#DESCRIPTION)

.PP ldbsearch searches a LDB database for records matching the specified expression (see the [ldapsearch(1)](/man/os/ldb/ldapsearch.1) manpage for a description of the expression format). For each record, the specified attributes are printed.

# [OPTIONS](#OPTIONS)

.PP -h

Show list of available options.

.RE

.PP -H &lt;ldb-url&gt;

LDB URL to connect to. See [ldb(3)](/man/os/ldb/ldb.3) for details.

.RE

.PP -s one|sub|base

Search scope to use. One-level, subtree or base.

.RE

.PP -i

Read search expressions from stdin.

.RE

.PP -b basedn

Specify Base DN to use.

.RE

# [ENVIRONMENT](#ENVIRONMENT)

.PP LDB\_URL

LDB URL to connect to (can be overridden by using the -H command-line option.)

.RE

# [VERSION](#VERSION)

.PP This man page is correct for version 1.1 of LDB.

# [SEE ALSO](#SEE_ALSO)

.PP [ldb(3)](/man/os/ldb/ldb.3), [ldbedit(1)](/man/os/ldb/ldbedit.1)

# [AUTHOR](#AUTHOR)

.PP ldb was written by **Andrew Tridgell**\[1].

.PP If you wish to report a problem or make a suggestion then please see the **http://ldb.samba.org/** web site for current contact and maintainer information.

.PP This manpage was written by Jelmer Vernooij.

# [NOTES](#NOTES)

1\.

Andrew Tridgell

https://www.samba.org/~tridge/

10/25/2026 LDB 1.1

---

Document: ldbsearch(1) from ldb 2.9.2-r9 (Chainguard OS)
Source: https://gitlab.com/samba-team/samba.git
