you need some libraries and programs such as python3 to run the wrapper/tools
you can then proceed as a BDC
dc2
mv /etc/samba/smb.conf /etc/samba/smb.conf.dist
samba-tool domain join EXAMPLE.LOCAL DC \
--username=EXAMPLE\\administrator \
--dns-backend=SAMBA_INTERNAL \
--option="interfaces = lo eth0" \
--option="bind interfaces only = yes"
fix the netbios name
vi /etc/samba/smb.conf
[global]
bind interfaces only = yes
interfaces = lo eth0
netbios name = DC2
realm = EXAMPLE.LOCAL
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
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