Strange fix for SMB problems in Linux

Linux Sucks. Last week, the upgrade to Ubuntu 11 severely broke all carefully selected menu colors, graphics settings and icon sets. I gave up the fight after a few hours of effortless restoration work and switched to Linux Mint 11.

While setting up my machine and restoring the links to the company Windows file servers I could not connect. The password window would re-appear without any feedback. The fix was even stranger than the problem.

To analyze this strange problem, [@sastuvel](http://twitter.com/#!/sastuvel) took the keys and tried the following on the command prompt:

[sourcecode light="true"] $ smbclient //server/Share$ -U DOMAIN\rolf -d 2 rlimit_max: increasing rlimit_max (1024) to minimum Windows  limit (16384) added interface eth0 ip=fe80::5e26:aff:fe12:5a23%eth0 bcast=fe80::ffff:ffff:ffff:ffff%eth0 netmask=ffff:ffff:ffff:ffff:: added interface eth0 ip=172.17.100.74 bcast=172.17.255.255 netmask=255.255.0.0 Enter DOMAIN\rolf's password: tdb(unnamed): tdb_open_ex: could not open file /var/run/samba/gencache.tdb: Permission denied session setup failed: NT_STATUS_MORE_PROCESSING_REQUIRED did you forget to run kinit? [/sourcecode]

Of course we did run kinit and everything was up and running. No level of debug logging came up with something useful. After staring at this problem of a while I noticed that my hostname was "rolf-Latitude-E6510", which seemed a bit long. In a strange last resort voodo-chicken action I edited /etc/hostname to change it to "dellmint" and rebooted the machine.

Strangely, this solved the problem. So if you're running Linux (Mint) and have strange problems mounting SMB shares, check your hostname and change it to something simple and short. It might help.

And while you're at it, you can also install touchpad indicator to disable your touchpad when you plug in your mouse. Why this isn't standard in every Linux distribution baffles me just as much as the blinking wifi indicator.