root@debian:~# rm /etc/samba/smb.conf root@debian:~# samba-tool domain provision Realm: TEST.JP Domain [TEST]: Server Role (dc, member, standalone) [dc]: DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]: DNS forwarder IP address (write 'none' to disable forwarding) [192.168.1.74]: Administrator password: Retype password: Looking up IPv4 addresses Looking up IPv6 addresses More than one IPv6 address found. Using 2400:4052:46e0:b700:20c:29ff:febe:decd Setting up share.ldb Setting up secrets.ldb Setting up the registry Setting up the privileges database Setting up idmap db Setting up SAM db Setting up sam.ldb partitions and settings Setting up sam.ldb rootDSE Pre-loading the Samba 4 and AD schema Unable to determine the DomainSID, can not enforce uniqueness constraint on local domainSIDs Adding DomainDN: DC=test,DC=jp Adding configuration container Setting up sam.ldb schema Setting up sam.ldb configuration data Setting up display specifiers Modifying display specifiers and extended rights Adding users container Modifying users container Adding computers container Modifying computers container Setting up sam.ldb data Setting up well known security principals Setting up sam.ldb users and groups Setting up self join Adding DNS accounts Creating CN=MicrosoftDNS,CN=System,DC=test,DC=jp Creating DomainDnsZones and ForestDnsZones partitions Populating DomainDnsZones and ForestDnsZones partitions Setting up sam.ldb rootDSE marking as synchronized Fixing provision GUIDs A Kerberos configuration suitable for Samba AD has been generated at /var/lib/samba/private/krb5.conf Merge the contents of this file with your system krb5.conf or replace it with this one. Do not create a symlink! Once the above files are installed, your Samba AD server will be ready to use Server Role: active directory domain controller Hostname: debian NetBIOS Domain: TEST DNS Domain: test.jp DOMAIN SID: S-1-5-21-3562033540-3235279490-2880000022 root@debian:~# cp /var/lib/samba/private/krb5.conf /etc/krb5.conf root@debian:~# cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" root@debian:~# cat /etc/debian_version 10.0 root@debian:~# samba -V Version 4.9.5-Debian root@debian:~# samba -i -M single samba version 4.9.5-Debian started. Copyright Andrew Tridgell and the Samba Team 1992-2018 binary_smbd_main: samba: using 'single' process model Attempting to autogenerate TLS self-signed keys for https for hostname 'DEBIAN.test.jp' TLS self-signed keys generated OK