No config changes on the VM or host occurred; results from Google and SE didn't solve issue
I have been using a script to backup some stuff from a Debian VM onto a Windows 7 host (the Debian VM sits on the same Windows 7 host) that worked fine until a couple of days ago, with one of the commands being:
smbclient //MYWINPC/myShare -U=myusername -c "put $2.sql.gz db/$2.sql.gz"- The script suddenly stopped working yesterday, returning the following error:
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
Troubleshooting:
- Reverted to a VM snapshot of when the script was still working: now it no longer works and produces the error above
- Since Windows Event Viewer was throwing out the following error, I changed
/etc/samba/smb.confto prevent the Debian VM from participating in master browser elections, to no availThe master browser has received a server announcement from the computer <my Debian VM> that believes that it is the master browser for the domain on transport NetBT_Tcpip_{<NetBT_Tcpip_ID>. The master browser is stopping or an election is being forced. - Tried accessing the Debian VM from the Windows 7 host via Samba (successful)
- Disabled Windows Firewall: no change
smbclientlog showssmbclientis trying to access the share locally rather than on the Windows 7 host:[2020/08/17 11:06:46.714698, 0] ../source3/param/loadparm.c:3362(process_usershare_file) process_usershare_file: stat of /var/lib/samba/usershares/myShare failed. Permission denied [2020/08/17 11:06:46.715915, 0] ../source3/param/loadparm.c:3362(process_usershare_file) process_usershare_file: stat of /var/lib/samba/usershares/myShare failed. No such file or directorysmbclientstill works when I replace thehostnamewith its IP address, so somehow the VM is no longer able to resolve the NetBIOS name:smbclient //192.168.1.24/myShare -U=myusername -c "put $2.sql.gz db/$2.sql.gz"- From a different Windows PC, I can browse the Windows 7 host and its shares directly by browsing via Network in File Manager, so there should be no name resolution issues per se
nbtstat -rreturns the following, so I am not sure why the NetBIOS name for the Windows 7 machine is not included:NetBIOS Names Resolution and Registration Statistics ---------------------------------------------------- Resolved By Broadcast = 4 Resolved By Name Server = 0 Registered By Broadcast = 18 Registered By Name Server = 0 NetBIOS Names Resolved By Broadcast --------------------------------------------- <ROUTERNAME> <DEBIANVM> <ROUTERNAME> <DEBIANVM>- Running
smbtree -bproduces unexpected results: all shares enumerated point to the Debian VM where Samba is installed, rather than displaying the actual shares for each machine (shares enumerated are incorrect for all machines exceptDEBIANVM):WORKGROUP \\DEBIANVM Samba 4.9.5-Debian \\DEBIANVM\IPC$ IPC Service (Samba 4.9.5-Debian) \\DEBIANVM\homedir \\DEBIANVM\webdir \\DEBIANVM\print$ Printer Drivers \\MYWINPC-2 \\MYWINPC-2\IPC$ IPC Service (Samba 4.9.5-Debian) \\MYWINPC-2\homedir \\MYWINPC-2\webdir \\MYWINPC-2\print$ Printer Drivers \\MYWINPC MYWINPC \\MYWINPC\IPC$ IPC Service (Samba 4.9.5-Debian) \\MYWINPC\homedir \\MYWINPC\webdir \\MYWINPC\print$ Printer Drivers ROUTERNAME \\ROUTERNAME Router Gateway \\ROUTERNAME\IPC$ IPC Service (Samba 4.9.5-Debian) \\ROUTERNAME\homedir \\ROUTERNAME\webdir \\ROUTERNAME\print$ Printer Drivers - Upgraded VirtualBox to v. 5.2.44 (added for tracking purposes only)
Any idea as to what the problem is?