Samba won't start and I've done 'locate smb.conf' but it can't be found. I cd'd to '/usr/local/samba/etc/' and not in '/etc/samba/' either. The samba path in in '/etc/environment' so I can start samba with 'service samba4 start' but it won't start. How can I repair this problem? Can I just copy a smb.conf from another samba server?
3 Answers
I had this problem and an error report eventually came up which identified my situation exactly - I had done;
sudo apt-get remove samba --purgesudo apt-get autoremove- manually deleted contents of
/etc/sambaincludingsmbd.conf - reinstalled samba
What I did NOT do but should have done before reinstalling samba was
sudo apt-get purge samba-commonIf you do this, then reinstall, the samba directory and conf file will be reinstalled.
1I have two of these files in /etc/samba/ and /usr/share/samba/. Investigate if you have all the appropriate samba packages installed. Mine are installed from the Ubuntu distribution using apt-get.
Also the locate is not necessarily inclusive of the entire filesystem. Use find if you want to search everything.
This tutorial does a really great job of explaining how to install Samba 4.0.9 including the step(s) to create /etc/samba/smb.conf.
5