[Samba] How do I list computers in the domain

L.P.H. van Belle belle at bazuin.nl
Fri Sep 18 06:30:25 UTC 2015


Sure there is a sam.ldb. if you cant find it install mlocate, type updatedb, and locate sam.ldb 

Or if you type samba -b 

You have all your samba folders, it should be in one of these, and normaly in the private_dir folder. 

Greetz, 

Louis



> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens Robert Moskowitz
> Verzonden: donderdag 17 september 2015 22:44
> Aan: Rowland Penny; samba at lists.samba.org
> Onderwerp: Re: [Samba] How do I list computers in the domain
> 
> 
> 
> 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
> >>>>
> >>
> >>
> >
> >
> 
> 
> --
> 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