OxDEAD Unicornz

Have you ever seen so many?

Debian 8 Wicd + NetworManager = Broken Samba

As I wrote recently I’ve upgraded OS on my netbook to Debian 8. Everything was working excellent except autodiscovery of SAMBA share.

Here is global part of my SAMBA config:

1
2
3
4
5
6
7
8
9
10
11
12
13
[global]
        server string = %h server
        obey pam restrictions = Yes
        pam password change = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        unix password sync = Yes
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        name resolve order = bcast host wins lmhosts
        dns proxy = No
        panic action = /usr/share/samba/panic-action %d

Note name resolve order.

I rely on broadcast SAMBA share discovery mainly for portability reasons – you just connect to friend’s home network and you see his shares, he sees your share. No mess with WINS server/lmhosts, this just works.

Unless, of course, if you have both wicd and NetworkManager fighting for your wireless interface. For some reason after upgrade NetworkManager became active, was trying to take control over wpa_supplicant and failing because wicd is already handling this. Except warnings in log you may notice it takes longer to connect to wireless network.

It also was taking very long for host to appear in the list of hosts in WORKGROUP on file browser. If I tried to open problem host I was getting an error

1
2
Unable to mount location
Failed to retrieve share list from server

After some investigation I’ve discovered SAMBA share was accessible directly by IP but not via host name which indicates problems with nmbd and name resolve order. Usually this issue appears when broadcast discovery is not listed first in name resolve order, but in this case the reason was NetworkManager. As soon as I remove it discovery stared to work normally and SAMBA share on netbook became accessible.