[Samba] How do I list computers in the domain
Robert Moskowitz
rgm at htt-consult.com
Thu Sep 17 20:43:33 UTC 2015
On 09/17/2015 03:26 PM, Rowland Penny wrote:
> On 17/09/15 18:28, Robert Moskowitz wrote:
>>
>>
>> On 09/17/2015 04:07 AM, mathias dufresne wrote:
>>> You can use ADUC tool which is part of RSAT.
>>
>> Don't have RSAT on a computer yet, and anyway I want to do this on
>> the server, not a client.
>>
>>> You can also use ldbsearch:
>>> ldbsearch -H $sam '(objectclass=computer)' dn
>>
>> Had to install ldb-tools on the ClearOS system and got:
>>
>> # returned 0 records
>> # 0 entries
>> # 0 referrals
>>
>> Yet I know there are two computers joined to this PDC.
>
> You need to run this on the DC and replace '$sam' with the path for
> sam.ldb i.e.
>
> ldbsearch -H /var/lib/samba/private/sam.ldb '(objectclass=computer)' dn
OK. that works for the sernet samba AD, but there is no sam.ldb on
ClearOS. Going to have to dig deeper to find what file they are using.
thanks
>
>>
>> Same return on the new AD, but that is not supprising, given the
>> source of the problem for the migration of the users.
>>
>>> More info on ldbsearch and ldb tools there:
>>> https://wiki.samba.org/index.php/LDB
>>
>> More reading to do! :)
>>
>>>
>>>
>>> 2015-09-17 6:02 GMT+02:00 Robert Moskowitz <rgm at htt-consult.com>:
>>>
>>>> I want to see what computers have joined the domain. Not just those
>>>> currently connected as smbtree seems to do.
>>>>
>>>>
>>>>
>>>> --
>>>> To unsubscribe from this list go to the following URL and read the
>>>> instructions: https://lists.samba.org/mailman/options/samba
>>>>
>>
>>
>
>
More information about the samba
mailing list