Samba v4 Backup Domain Controller

Requirements

you first need to setup the host as a domain member

you also need some libraries and programs such as python3 to run the wrapper/tools

Setup

you can then proceed as a BDC

dc2

    mv /etc/samba/smb.conf /etc/samba/smb.conf.dist
    samba-tool domain join EXAMPLE.NET DC \
            --username=EXAMPLE\\administrator \
            --dns-backend=SAMBA_INTERNAL \
            --option="interfaces = lo xenbr0" \
            --option="bind interfaces only = yes"

fix the netbios name

    vi /etc/samba/smb.conf

    [global]
            bind interfaces only = yes
            interfaces = lo xenbr0
            netbios name = DC2
            realm = EXAMPLE.NET
            server role = active directory domain controller
            workgroup = EXAMPLE

    [sysvol]
            path = /var/lib/samba/sysvol
            read only = No

    [netlogon]
            path = /var/lib/samba/sysvol/example.net/scripts
            read only = No

Ready to go

    vi /etc/rc.d/rc.local

    mkdir -p /var/run/samba/
    echo starting BDC
    samba && echo done
    #grep 'interfaces =' /etc/samba/smb.conf

    pgrep -a samba
    ps auxfww | less # /samba


    vi /etc/rc.d/rc.local_shutdown

    echo -n killing BDC...
    pkill samba && echo done

    chmod +x /etc/rc.d/rc.local_shutdown

HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | NU | HTML5
Copyright © 2022 Pierre-Philipp Braun