Hi all, Is there a command line to add DC to some site? The idea is to have a domain with several sites. If the whole AD database get corrupt I would restore some backup to recreate the first DC (the one with FSMO) then I'll join all others DC to that domain to force them to rebuild their database according to the one restored. Doing that I'll get all DC with the right DB but also in the default site. What's missing to be able to rebuild automatically the whole domain seems to be the possibility to add DC to their site. Having such a command we'll be able to rebuild completely a domain with script, avoiding human mistake as possible... Best regards, mathias
On 06/10/15 09:07, mathias dufresne wrote:> Hi all, > > Is there a command line to add DC to some site? > > The idea is to have a domain with several sites. If the whole AD database > get corrupt I would restore some backup to recreate the first DC (the one > with FSMO) then I'll join all others DC to that domain to force them to > rebuild their database according to the one restored. > > Doing that I'll get all DC with the right DB but also in the default site. > What's missing to be able to rebuild automatically the whole domain seems > to be the possibility to add DC to their site. > > Having such a command we'll be able to rebuild completely a domain with > script, avoiding human mistake as possible... > > Best regards, > > mathiasBoth 'samba-tool domain provision' and 'samba-tool domain join' have the '--site=SITE' switch, this what you are looking for? Rowland
My bad: https://wiki.samba.org/index.php/Active_Directory_Sites There is a switch --site="site name" we can add to our join command. the whole example: *samba-tool domain join samdom.example.com <http://samdom.example.com> DC -Uadministrator --realm=samdom.example.com <http://samdom.example.com> --site=MyDemoSite ...* Thank you for that Samba team ;) 2015-10-06 10:07 GMT+02:00 mathias dufresne <infractory at gmail.com>:> Hi all, > > Is there a command line to add DC to some site? > > The idea is to have a domain with several sites. If the whole AD database > get corrupt I would restore some backup to recreate the first DC (the one > with FSMO) then I'll join all others DC to that domain to force them to > rebuild their database according to the one restored. > > Doing that I'll get all DC with the right DB but also in the default site. > What's missing to be able to rebuild automatically the whole domain seems > to be the possibility to add DC to their site. > > Having such a command we'll be able to rebuild completely a domain with > script, avoiding human mistake as possible... > > Best regards, > > mathias >
Yes, that should be. I haven't tested that yet but I'm pretty confident it works. Cheers, m. 2015-10-06 10:19 GMT+02:00 Rowland Penny <rowlandpenny241155 at gmail.com>:> On 06/10/15 09:07, mathias dufresne wrote: > >> Hi all, >> >> Is there a command line to add DC to some site? >> >> The idea is to have a domain with several sites. If the whole AD database >> get corrupt I would restore some backup to recreate the first DC (the one >> with FSMO) then I'll join all others DC to that domain to force them to >> rebuild their database according to the one restored. >> >> Doing that I'll get all DC with the right DB but also in the default site. >> What's missing to be able to rebuild automatically the whole domain seems >> to be the possibility to add DC to their site. >> >> Having such a command we'll be able to rebuild completely a domain with >> script, avoiding human mistake as possible... >> >> Best regards, >> >> mathias >> > > Both 'samba-tool domain provision' and 'samba-tool domain join' have the > '--site=SITE' switch, this what you are looking for? > > Rowland > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >