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 took the keys and tried the following on the command prompt:

$ 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
  added interface eth0 ip= bcast=
Enter DOMAIN\rolf's password:
  tdb(unnamed): tdb_open_ex: could not open file
  Permission denied
  did you forget to run kinit?

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.


4 Responses to Strange fix for SMB problems in Linux

  1. Hi there. Just a big THANKS for this post. I was just going crazy with my 12.04 box against a Netapp file server until I found this. You really made my day!!


  2. nadi says:

    Thanks thanks thanks thanks thanks!! redicoulus problem, redicoulus solution.
    Thanks again Rolf!
    BTW, you do not need to reboot after changing the hostname….
    cheers! Nadi

  3. Kersten says:

    Muchas gracias senor!!!

    Would have never came up with that!

    Made my (many) day(s)!

  4. Billy in Seattle says:

    This remains a current issue (Linux Mint 17.3)

    tdb(/var/cache/samba/gencache.tdb): tdb_open_ex: could not open file /var/cache/samba/gencache.tdb: Permission denied

    Mine hostname…
    was: Linux-Inspiron-680s
    now: Linux01

    Note: I’m on day 2 of ever installing and/or using Linux.
    Thanks so much for your help.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s