Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
RobertX
Level 4
Level 4
Posts: 253
Joined: Thu Apr 12, 2012 6:09 pm

Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RobertX »

Just now, I can't access my Linux Mint 20.3 shares with my Windows 7 computer days after I updated some files on the Linux Mint box (or so I think).

However, I can use my Windows 7 computer to communicate with the Windows 10 computer my mother is using, and I can use my Mint computer to communicate with my two other Windows boxes on caja.

Other than that, the Linux Mint box can't be access anywhere with the Windows computers.

I have yet to try adding shares on smb.conf; I have been using caja-share. Can that make a difference?

I will try to alter smb.conf right now.

EDIT: By the way, when I try to access Mint through Windows 7, I see the message "Unspecified Error." 0x80004005. Further report says it can't detect that computer.

EDIT: Confirmed. the Windows 10 box can't access the Linux Mint 20.3 box either. It's a one-way street when communicating with the Mint box.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
josebarg
Level 1
Level 1
Posts: 14
Joined: Tue Apr 12, 2022 3:19 pm

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by josebarg »

First you can try to access your Linux shares directly by IP, in windows just type in the file manager address bar:
\\yourlinuxip\sharedfolder

If you have Time Shift, I suggest you to try to restore Linux to a date previous to the update, cos the problem is probably caused due to a samba update.

If you have not time shift available, you can try to revers samba manually to the previous version with the following commands, be sure to execute them, one by one, not missing anyone and respecting the order.

Code: Select all

sudo apt-get remove python3-samba -y
sudo apt-get remove samba-dsdb-modules -y
sudo apt-get remove libsmbclient -y
sudo apt-get remove samba -y
sudo apt-get remove samba-vfs-modules -y
sudo apt-get remove smbclient -y
sudo apt-get remove samba-libs -y
sudo apt-get remove libwbclient0 -y
sudo apt-get remove samba-common-bin -y
sudo apt-get remove samba-common -y
sudo apt-get install libwbclient0=2:4.13.17~dfsg-0ubuntu0.21.04.1 -y
sudo apt-get install samba-libs=2:4.13.17~dfsg-0ubuntu0.21.04.1 -y
sudo apt-get install python3-samba=2:4.13.17~dfsg-0ubuntu0.21.04.1 -y
sudo apt-get install samba-dsdb-modules=2:4.13.17~dfsg-0ubuntu0.21.04.1 -y
sudo apt-get install libsmbclient=2:4.13.17~dfsg-0ubuntu0.21.04.1 -y
sudo apt-get install samba-common=2:4.13.17~dfsg-0ubuntu0.21.04.1 -y
sudo apt-get install samba-common-bin=2:4.13.17~dfsg-0ubuntu0.21.04.1 -y
sudo apt-get install samba=2:4.13.17~dfsg-0ubuntu0.21.04.1 -y
sudo apt-get install samba-vfs-modules=2:4.13.17~dfsg-0ubuntu0.21.04.1 -y
sudo apt-get install smbclient=2:4.13.17~dfsg-0ubuntu0.21.04.1 -y
sudo apt-get install gvfs-backends -y
sudo apt-get install caja-share -y
sudo apt-get install nemo-share -y
sudo apt-get install nautilus-share -y
Reboot Linux, and If this solves the problem be sure to set samba to do not update in the update manager, at least for now. Just right click on it in the update list, and you will have that option.

Please note, if you get to the point in which windows 7 machines can see you Linux computer and access it shares but windows 10 can not, be sure to enable SMB/CIFS in Windows 10, just google for it.
RobertX
Level 4
Level 4
Posts: 253
Joined: Thu Apr 12, 2012 6:09 pm

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RobertX »

Thanks for the reply.

I reverted to an old remastered version of Mint that I saved using Cubic.

Now the Windows computers can see and access the Mint box.

If you are going to hold on to those versions of Samba, are you going to keep holding on to them when it's time to upgrade the Mint system?
josebarg
Level 1
Level 1
Posts: 14
Joined: Tue Apr 12, 2022 3:19 pm

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by josebarg »

The problem is that Samba 1 protocol is being deprecated, and that's the protocol that windows uses to scan the network and show available computers, without that protocol, you should be able to connect to your mint shares directly by IP in windows, but I found that last Samba Update in some cases has problems with direct IP access as well. That's why I recommend for a quick Fix to downgrade Samba.

About holding or not Samba when you need to upgrade Mint to, let's say to 20.4 when is available, it depends on how available Samba version in that moment is working in that update, if you can at least connect to your shares directly by IP, is OK.

Before update Mint, make a TimeShift restore point if you can, that way you'll be able to undo the update if needed.

Another option is to check last samba version without updating your own system by using a virtual machine like VirtualBox and install last version of mint and all the updates on it to make configurations and compatibility test.

Of course, you can always look for another solutions to share your files, like: SFTP, Warpinator ...
RowlandP
Level 4
Level 4
Posts: 223
Joined: Tue Jan 26, 2021 7:30 am

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RowlandP »

josebarg wrote: Mon May 16, 2022 9:49 am The problem is that Samba 1 protocol is being deprecated, and that's the protocol that windows uses to scan the network and show available computers, without that protocol, you should be able to connect to your mint shares directly by IP in windows, but I found that last Samba Update in some cases has problems with direct IP access as well. That's why I recommend for a quick Fix to downgrade Samba.
Samba has deprecated SMBv1, but it hasn't been removed yet, it is just turned off by default. You can easily turn it back on again if you require it. If you are having problems with connecting via an ipaddress, then this is probably because of a lack of SMBv1, either on the client or server, depending on how you are connecting. If you are sure that both ends of the connection are using the same SMB protocol but you are refused, then check the user and password are known to both ends and the user has the required permissions on the share. If you are sure everything is correct, but you cannot connect, then this could be a bug and should be reported.
Reddog1
Level 7
Level 7
Posts: 1868
Joined: Wed Jun 01, 2011 2:12 pm

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by Reddog1 »

Windows 7 only 'knows' SMB1. To revert your samba to smb1, add this to /etc/samba/smb.conf [global]

# To revert to SMB1 protocol
client min protocol = NT1
server min protocol = NT1

This will cause problems if you also have W10 computers on your network because W10's samba is not smb1. You can edit the Windows 10 registry to force SMB1 if you need to connect your W7 machines and your W10 machines. Otherwise you can install Warpinator on the W10 machines and your Linux machines and transfer files that way and by-pass samba altogether. Warpinator isn't as convenient as seeing your network shares in File Manager, but it works well as a file transfer tool. I've never tried to install Warpinator on W7, so I do not have any insight as to whether Warpinator is possible on a W7 machine.
RowlandP
Level 4
Level 4
Posts: 223
Joined: Tue Jan 26, 2021 7:30 am

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RowlandP »

Reddog1 wrote: Mon May 16, 2022 1:29 pm Windows 7 only 'knows' SMB1.
That is true and false. True as in that it uses SMBv1 by default, but false as you can configure Windows 7 to use SMBv2.
RobertX
Level 4
Level 4
Posts: 253
Joined: Thu Apr 12, 2012 6:09 pm

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RobertX »

I added those lines.

When the troubles began, the lines were still there.
Reddog1
Level 7
Level 7
Posts: 1868
Joined: Wed Jun 01, 2011 2:12 pm

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by Reddog1 »

Just for the record, the samba update didn't break anything on my network, but I'm using Mint 20.2. I also have a bunch of VM's, and an Apple, and I don't think any of those are broken, either. Everything on my network is forced to smb1, at least until samba gets sorted out.
RobertX
Level 4
Level 4
Posts: 253
Joined: Thu Apr 12, 2012 6:09 pm

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RobertX »

Reddog, how long have you been using 20.2? Since it came out? I think I'll be stuck with 20.3 forever then.
RobertX
Level 4
Level 4
Posts: 253
Joined: Thu Apr 12, 2012 6:09 pm

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RobertX »

RowlandP wrote: Mon May 16, 2022 12:05 pm then this could be a bug and should be reported.
Where? To the developers of Samba, or to the developers of Mint?
RobertX
Level 4
Level 4
Posts: 253
Joined: Thu Apr 12, 2012 6:09 pm

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RobertX »

I do have a new question: is the Samba version in Mint's repositories the same as those in Ubuntu's?
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by altair4 »

You folks need to differentiate between a client's ability to discover-then-connect to a SMB host and a client's ability to connect to a SMB host directly.

Those are two different things.

SMB host discovery has traditionally been via NetBIOS. You are going to have problems with SMB host discovery without SMB1.

This has nothing to do with a client connecting to the samba host however.

Specifically,

WinXP was the last WinOS to use SMB1 only so it will not be able to discover or connect to a Samba host without modifying the Samba host to enable SMB1.

WinVista uses SMB1 and SMB2.0 but not SMB2.1 which Samba uses so it too will not be able to discover the Samba host without modification.

Win7 can use SMB2.1 so although it cannot discover the SMB host it can still connect to it's shares you just have to specify that when you access ... \\192.168.1.100\share-name.

Win10/11 can go all the way up to SMB3 so it is more than capable of connecting to the SMB host without using SMB1. Discover-then-connect is still a problem without SMB1 but Win10/11 can use multiple ways around this.

You can implement WSDD on the Samba server so Win10 can discover it with it's native discovery protocol. Win10/11 can also use mDNS to connect to the share ( \\linux-host-name.local\share=name )
And as usual it can also connect by ip address.

MacOS represents what is possible when the development team is not held back by the failure of the gnome/gvfs backend.

A modern Samba server publishes it's presence to the network with mDNS. MacOS can discover it using the same technology ( Bonjour ) seamlessly. In it's current state and with the bugs in gvfs that Mint / Ubuntu uses MacOS is the only desktop operating system that can discover-then-access a samba server without any modification. Win10/11 can match that is you enable WSDD on the samba server/
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
RobertX
Level 4
Level 4
Posts: 253
Joined: Thu Apr 12, 2012 6:09 pm

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RobertX »

altair4, with the new Samba update, I am afraid that using the IP address of the Mint machine does not work.

We'll forget about the Windows 10 connecting to the Mint box for the time being, the interaction between Mint and the Windows 10 box is not relevant to the problem save only for the fact that the Mint box can connect to the Windows 10 box's printer is possible.

For now, remember that I can still use Mint to connect to the Windows machines fine (Windows 7 and 10) just fine using their IP address. Other than that, just forget about Windows 10.

My immediate problem with the new update is that connecting to the Mint box is not facilitating with Wi ndows 7. I've tried using both the Mint box's computer name and the IP address and it didn't work, even with setting the client and server protocols of the Mint computer to NT1 does not work.

I am currently using the earlier version of Samba, one that can be valid with using the computer names and the IP addresses. I am petrified with upgrading anything on the SOB's Samba version right now.

What are my options?

EDIT: I didn't read the part about WSDD. I'll do that now.

EDIT: altair4, that post you linked about WSDD talks about Windows 10 to Mint. What about Windows 7? Is that fair game too?
RowlandP
Level 4
Level 4
Posts: 223
Joined: Tue Jan 26, 2021 7:30 am

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RowlandP »

RobertX wrote: Mon May 16, 2022 5:32 pm
RowlandP wrote: Mon May 16, 2022 12:05 pm then this could be a bug and should be reported.
Where? To the developers of Samba, or to the developers of Mint?
This would depend on how you are trying to connect, if you are using the OS tools (gvfs etc), then Mint, but if you are using smbclient, then Samba.
RowlandP
Level 4
Level 4
Posts: 223
Joined: Tue Jan 26, 2021 7:30 am

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RowlandP »

RobertX wrote: Mon May 16, 2022 9:52 pm altair4, with the new Samba update, I am afraid that using the IP address of the Mint machine does not work.

We'll forget about the Windows 10 connecting to the Mint box for the time being, the interaction between Mint and the Windows 10 box is not relevant to the problem save only for the fact that the Mint box can connect to the Windows 10 box's printer is possible.

For now, remember that I can still use Mint to connect to the Windows machines fine (Windows 7 and 10) just fine using their IP address. Other than that, just forget about Windows 10.

My immediate problem with the new update is that connecting to the Mint box is not facilitating with Windows 7. I've tried using both the Mint box's computer name and the IP address and it didn't work, even with setting the client and server protocols of the Mint computer to NT1 does not work.

I am currently using the earlier version of Samba, one that can be valid with using the computer names and the IP addresses. I am petrified with upgrading anything on the SOB's Samba version right now.

What are my options?

EDIT: I didn't read the part about WSDD. I'll do that now.

EDIT: altair4, that post you linked about WSDD talks about Windows 10 to Mint. What about Windows 7? Is that fair game too?
If you are using Samba with SMBv1 (NT1) then you are using Network Browsing, this does not work without SMBv1.
To replace Network Browsing for SMBv2 and up, Microsoft came up with Network Discovery (or wsdd in Linux terms) and this can be turned on for Windows 7.

You should be able to use the ipaddress to connect to a Samba share, but this may depend on just how you are trying to connect, if you are using the OS tools, then this may be a bug in those tools. Have you tried using smbclient:

Code: Select all

smbclient //ipv4_address/sharename -U your_username

MacOS is a bit different, when Samba moved to the GPLv3 license they didn't like that, so wrote their own SMB server/client. Samba now provides various VFS modules to allow interoperability.

While Samba does contain bugs (which will be fixed if reported), it cannot fix bugs in external tools.
RobertX
Level 4
Level 4
Posts: 253
Joined: Thu Apr 12, 2012 6:09 pm

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RobertX »

Is smbclient a tool in Windows 7?

I can use Mint to access Windows shares, but not the other way around.

EDIT: But to answer your question, smbclient does work on Mint.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by altair4 »

From your Mint machine post the output of the following commands:

Code: Select all

hostname -I

Code: Select all

testparm -s

Code: Select all

net usershare info --long
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
RobertX
Level 4
Level 4
Posts: 253
Joined: Thu Apr 12, 2012 6:09 pm

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RobertX »

Thanks, altair4, I'll get back to you.
RowlandP
Level 4
Level 4
Posts: 223
Joined: Tue Jan 26, 2021 7:30 am

Re: Sudden error: Windows 7 cannot access Linux Mint 20.3 shares

Post by RowlandP »

RobertX wrote: Tue May 17, 2022 5:53 am Is smbclient a tool in Windows 7?

I can use Mint to access Windows shares, but not the other way around.

EDIT: But to answer your question, smbclient does work on Mint.
My guess is that this a SMBv1 problem, win7 defaults to SMBv1 and the latest Samba defaults to SMBv2.
Post what Altair4 has asked for, plus:

Code: Select all

smbd -V
Locked

Return to “Networking”