[Samba] access domain via ldap failed

Rowland Penny rpenny at samba.org
Fri Apr 20 08:53:48 UTC 2018


On Fri, 20 Apr 2018 10:01:33 +0800 (CST)
Ryan <ryanyang51 at 163.com> wrote:

> Er,there it is. I want to use samba to build a domain. I want to join
> computers into this domain. And I need to access this domain to get
> sid of computers in the domain, using C# class DirectoryEntry as
> 'ldap://my domain info' in my another program.
> 

So basically you want to run something like this:

ldbsearch -H ldap://dc4.samdom.example.com -b
dc=samdom,dc=example,dc=com -s sub '(&(objectclass=computer)(cn=*))' -U
Administrator

on a windows machine and extract the 'objectSid'

It works for me on a Unix machine against a 4.7.6 DC, so it sounds like
the problem isn't a Samba one, it is either a windows one or something
in your C#

Rowland



More information about the samba mailing list