# hostname sambadom.amitexample.com # samba-tool domain provision --domain=SAMBADOM INFO 2019-08-31 06:19:43,134 pid:1669 /usr/lib64/python3.7/site-packages/samba/netcmd/domain.py #449: Administrator password will be set randomly! ERROR(<class 'samba.provision.ProvisioningError'>): Provision failed - ProvisioningError: guess_names: 'realm =' was not specified in supplied /etc/samba/smb.conf. Please remove the smb.conf file and let provision generate it File "/usr/lib64/python3.7/site-packages/samba/netcmd/domain.py", line 537, in run backend_store=backend_store) File "/usr/lib64/python3.7/site-packages/samba/provision/__init__.py", line 2217, in provision sitename=sitename, rootdn=rootdn, domain_names_forced=(samdb_fill == FILL_DRS)) File "/usr/lib64/python3.7/site-packages/samba/provision/__init__.py", line 633, in guess_names raise ProvisioningError("guess_names: 'realm =' was not specified in supplied %s. Please remove the smb.conf file and let provision generate it" % lp.configfile) [root@sambadom samba]# rm -rf /etc/samba/smb.conf [root@sambadom samba]# cat /etc/samba/smb.conf cat: /etc/samba/smb.conf: No such file or directory [root@sambadom samba]# samba-tool domain provision --domain=SAMBADOM INFO 2019-08-31 06:19:55,347 pid:1672 /usr/lib64/python3.7/site-packages/samba/netcmd/domain.py #449: Administrator password will be set randomly! ERROR(<class 'samba.provision.ProvisioningError'>): Provision failed - ProvisioningError: guess_names: 'realm =' was not specified in supplied /etc/samba/smb.conf. Please remove the smb.conf file and let provision generate it File "/usr/lib64/python3.7/site-packages/samba/netcmd/domain.py", line 537, in run backend_store=backend_store) File "/usr/lib64/python3.7/site-packages/samba/provision/__init__.py", line 2217, in provision sitename=sitename, rootdn=rootdn, domain_names_forced=(samdb_fill == FILL_DRS)) File "/usr/lib64/python3.7/site-packages/samba/provision/__init__.py", line 633, in guess_names raise ProvisioningError("guess_names: 'realm =' was not specified in supplied %s. Please remove the smb.conf file and let provision generate it" % lp.configfile)
Well, I think you are missing a couple a things that you should provide, as stated in the Samba documentation. See the following link on Setting up Samba as an AD DC: https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller