If you’re trying to open a Linux Samba public share from a Windows 10 or 11 PC and receiving errors such as:
Network Error: Windows cannot access \\hostname. Check the spelling of the name. Otherwise, there might be a problem with your network. To try and identify and resolve network problems, click Diagnose.
or
System error 1272 has occurred.
You can’t access this shared folder because your organization’s security policies block unauthenticated guest access. These policies help protect your PC from unsafe or malicious devices on the network.
The problem is usually caused by Windows disabling “insecure guest logins” by default. This was introduced for security reasons to prevent unauthorized or malicious connections. If you still want to allow guest access to your public Samba shares, you can re-enable it in the Windows registry or Group Policy (on Pro editions). Note that doing this does lower security, so only proceed if you understand the implications.
Method 1: Use Group Policy Editor (Windows 10/11 Pro and Above)
Note: This option isn’t available on Windows Home editions.
1. Press Windows Key + R, type gpedit.msc
and hit Enter.
2. Go to Computer Configuration > Administrative Templates > Network > Lanman Workstation.
3. Double-click Enable insecure guest logons and set it to Enabled.
4. Click OK and exit.
Method 2: Edit Registry (All Windows Editions)
Press Windows Key + R, type regedit
, and run as Administrator.
Step A: Allow Insecure Guest Auth
1. In the Registry Editor, press Ctrl + F and search for AllowInsecureGuestAuth
.
2. When found, set the Value data to 1
to enable insecure guest auth.
3. Press F3 or Find Next to locate other instances. Most systems will have two such entries; change them both to 1
.
Step B: RequireSecuritySignature Setting
Depending on your environment, Windows may also require a specific value for RequireSecuritySignature
. Most commonly, RequireSecuritySignature
is set to 1
, but some users have reported success with 0
.
1. Press Ctrl + F again, enter RequireSecuritySignature
, and uncheck every box except Values.
2. Set Value data to 1
(or 0
if you find 1 doesn’t work).
3. Continue searching with Find Next and update all entries you find.
Once the above edits are made, you may need to restart for the changes to take effect.
Should You Re-Enable SMB v1?
Occasionally, people work around this issue by enabling the outdated SMB v1 protocol under “Turn Windows features on or off.” However, SMB v1 is deprecated and highly discouraged due to security vulnerabilities. Microsoft has disabled it by default for a good reason. If at all possible, stick to SMB v2 or v3 with secure authentication instead of a guest login.
Conclusion
In most cases, enabling insecure guest logons via Group Policy Editor or AllowInsecureGuestAuth through the registry is all you need to re-access your public Samba shares. If you still have trouble, verify that your network is set as Private (not Public) in Windows and that there are no additional third-party firewall restrictions in place.
Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.
Great! Thak worked for me, Thank you!
I had to do both steps, registry changes too
Now I have to figure out why I can only access the folders in the main disk and not the others…
Solution works. However, it works with RequireSecuritySignature set to 0 instead of 1.
I spent a late evening pulling my hair out trying to resolve this issue. I tried everything posted in this thread and many other suggestions without success. I was almost ready to wave the white flag when I figured it out myself. Hopefully this will help some of you who have been unsuccessful so far:
Go to the Windows Control Panel and under Programs select “Turn Windows Features On or Off”. Scroll down to “SMB 1.0/CIFS File Sharing Support” and place a checkmark beside this and click “OK”. It will then Search for the required files and apply the changes. Select “Restart Now” when prompted.
Click the START menu and type “regedit” and select “Run as Administrator”.
Go to the following location:
ComputerHKEY_LOCAL_MACHINESOFTWAREMicrosoftPolicyManagerdefaultLanmanWorkstationEnableInsecureGuestLogons
Double click on “value” and change the value data from 0 to 1 and select “OK”.
You may want to reboot at this point but I was able to access the SAMBA share immediately after changing this value. It is part 2 of my instructions above that seemed to be the special sauce. I had found many suggestions to turn on the SMB 1.0 feature, as well as suggestions to make changes to the Local Group Policy or using regedit to modify parts of the registry, but not the specific registry address referenced above. This is what worked for me and I hope that it makes life easier for someone else.
As an added note, my computers were running Winsows 10 Pro version 2004 and 20H2.
Thanks for the comment. However, my article was written to prevent people from re-enabling the unsecure SMB 1 protocol. I would never advise that users enable SMB 1 in Windows 10 as it opens up the OS to security holes. Microsoft disabled it through Windows Update for a very good reason.
I would point people to this article if you are having issues viewing Samba shares from Windows 10. https://devanswe.rs/discover-ubuntu-machines-samba-shares-windows-10-network/
This guide has been updated as per recomedations by commenter MR0002 below.
It appears that gpedit.msc does not update all settings in regedit as required. Also, Windows 10 Home edition does not have gpedit.msc at all, so all updates must be done through regedit.
Hope this helps.
Worked flawlessly. Thank you!
One thing I would add. If you are having this issue and you are using Windows 10 Home, gpedit.msc is disabled by default and you need to use a bash script to enable it. Otherwise windows doesn’t recognize gpedit. Link to instructions below.
https://www.itechtics.com/enable-gpedit-windows-10-home/
Thanks for the link 🙂
Nope not working
wow that worked, thank you so much!
thanks this was a big big help if you have legacy old linux hardware on your network; i became a computer god to these people now:)
Worked.
Thank you
For me, the solution was to update the registry and set both AllowInsecureGuestAuth to 1 and RequireSecuritySignature to 0, all the threads that came up in my searches (and I tried for hours) mentioned setting AllowInsecureGuestAuth to 1 or changing the Enable insecure guest logons in the group policy as this article details, but none of this worked for me until I also set RequireSecuritySignature to 0. I’m running the latest May 2020 Win10 Update build (version 2004), as soon as I set this additional registry setting I was able to connect to my share without issue, no restart needed. I was connecting to a WD MyCloud Home public drive from my work laptop while at home, and the MyCloud Home doesn’t allow you to set creds for the SMB Public drive – below are the registry settings that FINALLY resolved the issue.
One other note, there were additional firewall and network sharing / discovery controls on my machine, within Network and Sharing I had to change my home WiFi network to be marked as a Private Network instead of a Public Network – the additional restrictions were specific to Public networks, changing to Private resolved it.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanWorkstationParameters]
“AllowInsecureGuestAuth”=dword:00000001
“RequireSecuritySignature”=dword:00000000
saved my time and nerves …..thanks a lot for this solution .
Thank you!
Tried everything, but I guess this was the final step to get it working….
Excellent!
Excellent work!
This is the solution that worked for me! Thanks for posting. I had Windows10 Home versions that were not getting error, but main PC is Windows10 Pro and threw an error every time. Changing “AllowInsecureGuestAuth” to “1” fixed it. Interestingly Home does not have this Registry value avoiding the problem.
Getting done by editing the registry by your discussion. Thanks a lot.
Thank you. Thank you. Thank you. you made my day!
Changing the AllowInsecureGuestAuth worked for me. Thank you so much. I was tearing my hair out.
magic! this one really works!
Thank you! this helped me in getting the answer for my system. I did a search of RequireSecuritySignature and chamged all the instances to 0. I had to reconnect the network share because the browse gadget did not found it, then it was routine, login, password and connected! Thanks!
Thanks a lot guy, this works!
you are awesome!!!!
not working
Thank christ a super easy solution!
you’re magic…. success
Why does Windows more and more require regedit? It takes me ages to find keys and values described in such tweaks and 95% of the time, I neeed to create a non-sense DWORD. This is time consuming and error prone. Why aren’t there GUI tools to configure these options? I just cannot go on. This is over complicated and I’m about to bang my head over a wall. I just want to transfer data from my old computer to a new, made the stupid mistake of choosing a case that can just accept two drives and thus cannot add my old PC’s drive temporarily even though that looks to be the only solution. External hard drives are super super super slow, taking more than twenty minutes simply to copy a few gigabytes of data. I’m just done, I cannot continue like this (and yes this is supposed to be a USB3 external drive the ones I tried).
OMG!
I have tried so many things off the internet! This one worked straight off the bat!
You are a magician!
Thank you so much!
Thank you!
Did the trick beautifully, thanks!
😊👍
did not work for me
for me neither.
Same
It fixed access from this Win10 computer to others, but not my other computers to this Win10 computer. Half fixed.