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 --purge
sudo apt-get autoremove
- manually deleted contents of
/etc/samba
includingsmbd.conf
- reinstalled samba
What I did NOT do but should have done before reinstalling samba was
sudo apt-get purge samba-common
If you do this, then reinstall, the samba directory and conf file will be reinstalled.
I 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.
-
-
I installed samba from source. 'Find' did not give any result, but locate did.– JnPsonSep 30, 2013 at 20:06
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.
-
I will read through it and see if it gives me a better solution to the wiki-page I used during install. This is the guide I used: wiki.samba.org/index.php/Samba4/HOWTO/Join_a_domain_as_a_DC– JnPsonSep 30, 2013 at 20:24
-
By installing samba from source, it gets installed in /usr/local/samba/. I haven't installed from repository. I did ./configure --enable-debug --enable-selftest make make install– JnPsonSep 30, 2013 at 21:26
-
Have you verified that /usr/local/samba is in your PATH?
echo $PATH
Also, have you created the /etc/init.d script for samba4? Sep 30, 2013 at 22:38 -
Yes it is in PATH root@dc01:~# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/samba/bin:/usr/local/samba/sbin I have created the script for automatic start of samba4, yes.– JnPsonOct 1, 2013 at 11:00
-
smb.conf was missing in samba 4.0.9 I solved it by copying the content of DC01 and pasted it in a new smb.conf file on dc02, changed the netbios name in smb.conf to dc02. Then I used samba-tool domain join to add it as an additional domain controller. I started samba and it was working. They replicate between eachother– JnPsonOct 8, 2013 at 13:23