[Samba] (Samba 4) Recreate AD

Paul Hargreaves paul.hargreaves at technowizardry.co.uk
Mon Feb 8 17:04:15 UTC 2016


Actually I am using a single-service VM, but blowing away a VM just because I want to demote/promote feels like overkill.
For step 3, since I’m running from source, does that change anything?
re: step 4 I plan to edit the existing /usr/local/samba/etc/smb.conf and krb5.conf files, but if you think this is a bad idea then I’ll rebuild them. 

Thanks

Paul

> On 8 Feb 2016, at 16:43, mathias dufresne <infractory at gmail.com> wrote:
> 
> Hi,
> 
> Using VM helps: you can detroy them then re-create them easily. Looks like you are not using them...
> 
> How I proceed:
> 1° stop samba
> 2° rm -rf /var/lib/samba (where private and sysvol directories are)
> 3° force reinstall of packages, one only is needed to recreate /var/lib/samba and its content (samba-common with my version of Samba).
> 4° you could also remove /etc/samba/smb.conf and /etc/krb5.conf if you don't like them (which should be the case when renaming the domain)
> 
> Cheers,
> 
> mathias
> 
> 
> 2016-02-08 17:01 GMT+01:00 Paul Hargreaves <paul.hargreaves at technowizardry.co.uk <mailto:paul.hargreaves at technowizardry.co.uk>>:
> I’ve currently got a Samba 4 AD but want to rename it. However, as I understand things, renaming isn’t easy.
> Happy to rebuild it - home lab, only a few machines affected.
> 
> However, no topic in the FAQ on how to remove an existing domain: https://wiki.samba.org/index.php/FAQ <https://wiki.samba.org/index.php/FAQ> <https://wiki.samba.org/index.php/FAQ <https://wiki.samba.org/index.php/FAQ>>
> Demoting won’t work since it’s the last remaining server: https://wiki.samba.org/index.php/Demote_a_Samba_AD_DC <https://wiki.samba.org/index.php/Demote_a_Samba_AD_DC> <https://wiki.samba.org/index.php/Demote_a_Samba_AD_DC <https://wiki.samba.org/index.php/Demote_a_Samba_AD_DC>>
> 
> I assume I can just shut down the samba services and rm -rf some directories, but which ones?
> https://wiki.samba.org/index.php/Backup_and_restore_an_Samba_AD_DC <https://wiki.samba.org/index.php/Backup_and_restore_an_Samba_AD_DC> <https://wiki.samba.org/index.php/Backup_and_restore_an_Samba_AD_DC <https://wiki.samba.org/index.php/Backup_and_restore_an_Samba_AD_DC>> for restoring says
> # rm -rf /usr/local/samba/etc
> # rm -rf /usr/local/samba/private
> # rm -rf /usr/local/samba/var/locks/sysvol
> Is that sufficient?
> 
> Thanks
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba <https://lists.samba.org/mailman/options/samba>
> 



More information about the samba mailing list