Bug 14107 - Cannot provision samba domain after removing smb.conf
Summary: Cannot provision samba domain after removing smb.conf
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.10.4
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-31 11:24 UTC by Amit Kumar
Modified: 2020-05-28 19:22 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Kumar 2019-08-31 11:24:42 UTC
# 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)
Comment 1 Hezekiah 2020-05-28 19:22:38 UTC
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