Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

Since no one can help me with sharing files from Samba, how can I reset it to the defaults and delete any residual configurations from previous releases? Then, presumably, the GUI sharing would work after I reinstall samba. I tried using dpkg reconfigure samba, but it made things even worse, and now my ubuntu computer's hostname stopped existing. >:(

share|improve this question
up vote 5 down vote accepted

Try the following:

sudo apt-get purge samba
sudo rm -rf /etc/samba/ /etc/default/samba
sudo apt-get install samba

If you still have problems please provide more details.

share|improve this answer
This worked, thanks. I removed samba-common, too. Not sure if that was necessary, though. – endolith Jan 15 '11 at 17:56
You do indeed need to purge and reinstall samba-common aswell just samba is not enough – Dave Butler May 14 '14 at 16:55

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.