[Samba] especify a DN by using ldbsearch

Rowland Penny rpenny at samba.org
Tue Oct 4 13:18:28 UTC 2016

On Tue, 4 Oct 2016 08:48:47 -0400 (CDT)
Felipe_G0NZÁLEZ_SANTIAG0 via samba <samba at lists.samba.org> wrote:

> Hi @ll: 
> I need to get the objectClass of some objects by giving theirs
> DistinguishedNames. I've try with this: #ldbsearch -H
> dn='CN=nameTest,CN=Users,DC=example,DC=com' But: 
> # returned 3 records 
> # 0 entries 
> # 3 referrals 
> Any idea? 
> How Can I to specify a DN in ldbsearch command. 

Do you mean something like this:

# record 1
dn: CN=Rowland Penny,CN=Users,DC=samdom,DC=example,DC=com
objectClass: top
objectClass: securityPrincipal
objectClass: person
objectClass: organizationalPerson
objectClass: user

To get that, I used this:

ldbsearch -H ldap:// '(cn=Rowland Penny)' objectClass


More information about the samba mailing list