Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer
+1 for the find command ! – Magno C Sep 30 '13 at 19:06
I installed samba from source. 'Find' did not give any result, but locate did. – JnPson Sep 30 '13 at 20:06

I had this problem and an error report eventually came up which identified my situation exactly - I had done;

  1. sudo apt-get remove samba --purge
  2. sudo apt-get autoremove
  3. manually deleted contents of /etc/samba including smbd.conf
  4. 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.

share|improve this answer

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.

share|improve this answer
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: – JnPson Sep 30 '13 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 – JnPson Sep 30 '13 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? – Timothy Martin Sep 30 '13 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/loc‌​al/samba/bin:/usr/local/samba/sbin I have created the script for automatic start of samba4, yes. – JnPson Oct 1 '13 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 – JnPson Oct 8 '13 at 13:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.