Super User is a question and answer site for computer enthusiasts and power users. 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

client windows 7
samba running on ubuntu 12.04 LTS

I've been running samba on this box for a few years now without issue. All it does is share out the home directory.

In the home directory is a folder with a bunch of web apps. I run the webapps off of ubuntu and edit the files on windows via samba. the two are connected on a gigabit ethernet switch

Recently, all of a sudden, while editing the files in an editor (i've tried several) there seems to be some sort of problem when trying to save. the entire editor client freezes as if waiting for the save to complete. The duration varies, sometimes a few seconds sometimes up to a minute or so. The frequency also varies but it is quite often. Tonite it seemed like almost every 15 mins, sometimes more frequent.

During this time, I can still browse the share no problem in windows explorer. I've tried uploading files from here via ftp and i get the same issue, so it seems like it's related to reading and writing the files, instead of just getting the contents of the directory.

I've tried looking at /var/log/samba and there is nothing useful there. I tried /var/log/messages and anything in var/log that was updated during the time i saw it hang. I also tried looking at top and ps -ef while it was happening.

I've tried googling for all kinds of things but can't find anything.

Here is the relevant part of my smb.conf. It looks like the rest of the file is just defaults.

path = /home/dev_user
comment = home folder
available = yes
browsable = yes
public = no
writable = yes

Can anyone help please. This is driving me insane =(

share|improve this question

I have had this sort of problem in the past. I used this fix on Fedora 16 and 17 but I don't know if it will work on Ubuntu.

1) In the [global] section of /etc/samba/smb.conf add the following lines:

  name resolve order = lmhosts wins bcast host

2) Edit /etc/nsswitch.conf. look for the "hosts:" line and put "wins" before "dns". Here is an example line from my nsswitch.conf:

  hosts:    files mdns4_minimal [NOTFOUND=return] wins dns mdns4

3) You may need to restart samba for the changes to take effect.

I hope this helps.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .