[Samba] How do I list computers in the domain
Robert Moskowitz
rgm at htt-consult.com
Fri Sep 18 12:33:20 UTC 2015
On 09/18/2015 06:27 AM, mathias dufresne wrote:
> Ldapsearch filter are the same as those used by ldbsearch, at least for
> simple filters. That means you can use filters already given.
Yes they use openLDAP that is clear :)
But since I can't find their equivalent to sam.ldb, I am kind of stuck.
>
> 2015-09-18 11:26 GMT+02:00 Rowland Penny <rowlandpenny241155 at gmail.com>:
>
>> On 17/09/15 21:43, Robert Moskowitz wrote:
>>
>>>
>>> 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
>>>>>>>
>>>>>>>
>>>>>
>>>>
>>> Clearos appears to be using a version of LDAP, probably OPENLDAP, so you
>> will need to use the ldap-utils tools (ldapsearch etc), bit rusty on those,
>> so suggest a trip to google :-)
>>
>> Rowland
>>
>>
>> --
>> 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