I have an Ubuntu 14.04 box called watson with a static IP 192.168.7.101 running:
- dnsmasq
- samba
I also have a bunch of windows 7 home premium boxes that get their IP addresses from dnsmasq over DHCP. Watson shares two directories with no authentication (I trust anyone on my LAN, and it's all snapshotted on crashplan). However while the windows boxes can see the shares fine, attempting to open them often fails with 0x80070043
- the network name cannot be found. Restarting smbd and nmbd often makes the problem go away for a bit. Sometimes I can open one share, but not the other.
This has worked fine for years, but started going wrong after upgrading from 12.04 to 14.04 and/or moving house with new routers that enabled ipv6 and/or whatever security updates have been pushed by Ubuntu/Microsoft since mid-December
Things I have tried:
- Disabling ipv6 everywhere
- Enabling WINS server on samba
- Disabling CUPS support in SAMBA
- Enabling the various netbios DHCP options in dnsmasq
Any advice strongly appreciated. At this rate, I'm going to have to move to FreeNAS.
My personal tech level is a long-term C++ programmer (with a slowly degrading CCNA), so feel free to suggest techy solutions.
My samba config looks like this:
[global]
server string = %h server (Samba, Ubuntu)
server role = standalone server
map to guest = Bad Password
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 = wins, hosts, bcast
load printers = No
printcap name = /dev/null
disable spoolss = Yes
wins support = Yes
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb
printing = bsd
print command = lpr -r -P'%p' %s
lpq command = lpq -P'%p'
lprm command = lprm -P'%p' %j
[music]
path = /raid/music
read only = No
guest ok = Yes
[data]
path = /raid/data
read only = No
guest ok = Yes
My Dnsmasq (stripped of comments) looks like this:
This has all been working fine for years, but started going wrong
no-resolv
no-poll
server=8.8.8.8
server=4.4.4.4
server=192.168.7.1
domain=localdomain
dhcp-range=192.168.7.128,192.168.7.255,12h
dhcp-option=3,192.168.7.1
dhcp-option=19,0 # option ip-forwarding off
dhcp-option=44,192.168.7.101 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s)
dhcp-option=45,192.168.7.101 # netbios datagram distribution server
dhcp-option=46,8 # netbios node type
dhcp-authoritative
An example smbtree output from after JACKIS-PC (ip address 192.168.7.248) was able to open \\watson\data but failed to open \\watson\music follows:
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"
Processing section "[global]"
added interface eth0 ip=192.168.7.101 bcast=192.168.7.255 netmask=255.255.255.0
Enter mark's password:
tdb(/var/cache/samba/gencache.tdb): tdb_open_ex: could not open file /var/cache/samba/gencache.tdb: Permission denied
name_resolve_bcast: Attempting broadcast lookup for name WORKGROUP<0x1d>
Got a positive name query response from 192.168.7.101 ( 192.168.7.101 )
Connecting to 192.168.7.101 at port 445
Doing spnego session setup (blob length=74)
got OID=1.3.6.1.4.1.311.2.2.10
got principal=not_defined_in_RFC4178@please_ignore
Got challenge flags:
Got NTLMSSP neg_flags=0x608a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60088215
WORKGROUP
name_resolve_bcast: Attempting broadcast lookup for name WORKGROUP<0x1d>
Got a positive name query response from 192.168.7.101 ( 192.168.7.101 )
Connecting to 192.168.7.101 at port 445
Doing spnego session setup (blob length=74)
got OID=1.3.6.1.4.1.311.2.2.10
got principal=not_defined_in_RFC4178@please_ignore
Got challenge flags:
Got NTLMSSP neg_flags=0x608a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60088215
\\WATSON watson server (Samba, Ubuntu)
resolve_hosts: Attempting host lookup for name WATSON<0x20>
Connecting to 192.168.7.101 at port 445
Doing spnego session setup (blob length=74)
got OID=1.3.6.1.4.1.311.2.2.10
got principal=not_defined_in_RFC4178@please_ignore
Got challenge flags:
Got NTLMSSP neg_flags=0x608a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP Sign/Seal - Initialising with flags:imilarly
Got NTLMSSP neg_flags=0x60088215
\\WATSON\IPC$ IPC Service (watson server (Samba, Ubuntu))
\\WATSON\data
\\WATSON\music
\\LANGDALE-PIKE
resolve_hosts: Attempting host lookup for name LANGDALE-PIKE<0x20>
Connecting to 192.168.7.233 at port 445
This has all been working fine for years, but started going wrong
Doing spnego session setup (blob length=320)
got OID=1.3.6.1.4.1.311.2.2.30
got OID=1.3.6.1.4.1.311.2.2.10
got principal=<null>
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60088215
SPNEGO login failed: Logon failure
\\JACKIS-PC
resolve_hosts: Attempting host lookup for name JACKIS-PC<0x20>
Connecting to 192.168.7.248 at port 445
Doing spnego session setup (blob length=42)
got OID=1.3.6.1.4.1.311.2.2.30
got OID=1.3.6.1.4.1.311.2.2.10
got principal=<null>
Got challenge flags:
Got NTLMSSP neg_flags=0x628a8215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60088215
SPNEGO login failed: Logon failure