You are here

Tangling with the Samba

Submitted by Druss on Tue, 2007-05-22 13:47

I upgraded to Feisty over the weekend. Everything appeared to have gone through smoothly. However, I found that I could not access my Feisty shares from my other Linux / Windoze boxen. The connection just failed. I could however access other samba and windoze shares _from_ the Feisty box (which was living up to its name :S). So, I tried going into System Settings, Sharing to sort things out by fiddling with the options, making everything readable and writable by everybody, enabling guest account access and so on and so forth.

All to no avail.

Next step was to reinstall samba altogether. I purged it completely via aptitude after backing up all the config files. However, when I tried to install it again, apt threw up a bunch of install errors with the "post install" script, primarily invoke-rc.d: initscript samba, action "start" failed. I tried all the assortment of fixes that I sourced through Google. No luck.

Since the error was mainly a configuration related error, I tried to at least get back to square one by restoring the backed up configuration files in /etc/samba (smb.conf). Once that was done, I reran sudo apt-get -f install to sort things out and voilĂ , the installation completed.

So back at square one I was with none of the other PCs on my network being able to access my Feisty box. I decided to next try using the smb.conf (with appropriate changes) from one of my other boxes (running Edgy). After restarting samba, BOOM, other PCs could actually detect the shares on the Feisty box! However, when I tried to browse the files, my user name and passwords were rejected. My smb.conf had security set to user and appropriate passwords set for the user in question via smbpasswd.

So, some progress, but not very heartening. Via the command line, I could list my shares using smbclient -L \\\\mypc - this worked with an anonymous and authenticated login. However, trying to do any more resulted in a message Connection to [a bunch of hieroglyphics instead of the NETBIOS name of my PC] failed.

At this point, I decided to try getting some help on IRC and a kind soul (after looking at my pasted smb.conf) informed me that it was complete FUBAR-ed due to me using the KDE samba configuration applet and recommended using the default smb.conf supplied by the Samba project and avoid the completely raped Debian/KDE version.

So, off I went to the Samba website where I browsed around and came up with an example smb.conf for my version of Samba - 3.0.24 [You can surf to other versions via the ViewCVS interface]. So, I replaced my old smb.conf with this example smb.conf, added the 6 lines to share one of my folders and BOOM, I was in.

In conclusion, the moral of the story is that when in trouble start completely afresh. And do not use the KDE sharing applet - it is fucked :/