Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Can’t Access Shared Folders or Map Network Drives from Windows 10 and 11

May 10, 2023 Windows 10Windows 11Windows Server 2019

Can’t Access Shared Folders or Map Network Drives from Windows 10 and 11

If you cannot open or map network shared folders on your NAS, Samba Linux server, computers with legacy Windows versions (Windows 7/XP/Server 2003) from Windows 10 or 11, most likely the problem is that legacy and insecure versions of the SMB protocol are disabled in the current Windows builds (SMB protocol is used in Windows to access shared network folders and files).

Microsoft is systematically disabling legacy and insecure versions of the SMB protocol in all recent versions of Windows. Starting with Windows 10 1709 and Windows Server 2019 (both in Datacenter and Standard editions), the unsafe SMBv1 protocol is disabled by default as well as anonymous (guest) access to network shared folders.

The specific steps to take depend on the error that appears in Windows when accessing a shared folder, and on the settings of the remote SMB server that hosts the network shares.

Contents:
  • Can’t Access Shared Folder Because Security Policies Block Unauthenticated Guest Access
  • Can’t Connect to the File Share Because It’s Not Secure and Requires the Obsolete SMB1 Protocol
  • Windows Cannot Access Shared Folder: You Don’t Have Permissions
  • Other Fixes: Windows Cannot Access Shared Folders

Can’t Access Shared Folder Because Security Policies Block Unauthenticated Guest Access

Starting with Windows 10 build 1709 Fall Creators Update (Enterprise and Education editions), users began to complain that when they tried to open a network shared folder on a neighboring computer, an error appeared:

Restoring Network Connections
An error occurs when you try to open a network folder:
An error occurred while reconnecting Y: to \\nas1\share
Microsoft Windows Network: 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.

You can’t access this shared folder because your organization’s security policies block unauthenticated guest access.

Moreover, on other computers with Windows 8.1, Windows 7, or Windows 10 with a build of up to 1709, the same shared network folders open normally. The point is that in modern versions of Windows 10 (build 1709+), the guest access to the shared folders using the SMBv2 protocol is disabled by default. Guest (anonymous) means access to a shared network folder without authentication. When accessing a network folder under a guest account over the SMBv1/v2 protocol, such methods of traffic protection as SMB signing and encryption are not used, which makes your session vulnerable to the MiTM (man-in-the-middle) attacks.

These changes are not applied on Windows 10 Home editions and the network access under the guest account is working fine.

If you try to open a shared network folder using the SMB v2 protocol under the guest account, the following error will appear in the Event Viewer of your computer (SMB client):

Log Name: Microsoft-Windows-SmbClient/Security  
Source: Microsoft-Windows-SMBClient
Event ID: 31017
Rejected an insecure guest logon.

This error says that your computer (client) blocks non-authenticated access under the Guest account.

In most cases, you can face this problem when accessing old NAS devices (usually guest access is enabled on them for ease of setup) or when opening shared folders on legacy Windows 7/2008 R2/Windows XP/2003 devices with anonymous (guest) access enabled (see the table of supported SMB protocol versions in different Windows editions).

Microsoft recommends changing the settings on a remote computer or NAS device that hosts the shared network folders. It is advisable to switch the network share to the SMBv3 mode. Or configure access with authentication if only the SMBv2 protocol is supported by the device. This is the most correct and safest way to fix the problem.

Disable guest access on the device where your shared folders are stored:

  • NAS devices – disable guest access in the settings of your NAS device (depending on vendor and model);
  • Samba server on Linux — if you are sharing a network folder with Samba on Linux, add the following string to the smb.conf configuration file under the section [global]: map to guest = never
    And restrict anonymous access in the shared folder configuration section: guest ok = no
  • In Windows, you can enable sharing of network folders and printers with password protection via the Control Panel -> Network and Sharing Center -> Advanced sharing settings. For All Networks in the “Password Protected Sharing” section, change the value to the “Turn on password protected sharing”. In this case, anonymous (guest) access to the network shared folders will be disabled and you will have to create local users, grant them access permissions to the shared folders and printers and use these accounts to connect to the shared folders on a remote computer. windows 10 - enable password protected sharing (to disable guest access)

There is another way – you can change the settings on your Windows device to allow access to shared network folders under the guest account. This method should be used only as a temporary workaround (!!!), because access to folders without authentication significantly reduces your computer security.

To enable guest access from your computer, you need to use the Group Policy Editor (gpedit.msc). Go to the section: Computer Configuration -> Administrative templates -> Network -> Lanman Workstation. Find and enable the policy Enable insecure guest logons. This policy option determines whether the SMB client will allow an unsafe guest logon to the SMB server.

Enable insecure guest logons policy

Update the Group Policy settings in Windows with the command:

gpupdate /force

In Windows 10 Home, which does not have a local GPO editor, you can make a similar change through the Registry Editor manually:

HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters “AllowInsecureGuestAuth”=dword:1

Or with these commands:

reg add HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters /v AllowInsecureGuestAuth /t reg_dword /d 00000001 /f
reg add HKLM\Software\Policies\Microsoft\Windows\LanmanWorkstation /v AllowInsecureGuestAuth /t reg_dword /d 00000001 /f

Can’t Connect to the File Share Because It’s Not Secure and Requires the Obsolete SMB1 Protocol

Another possible problem when accessing a network folder from Windows 10 is that only the SMBv1 protocol version is supported on the server-side. Since the SMBv1 client is disabled by default in Windows 10 1709+ when you try to open the shared folder or map a network drive, you may get an error:

You can’t connect to the file share because it’s not secure. This share requires the obsolete SMB1 protocol, which is unsafe and could expose your system to attack. Your system requires SMB2 or higher.

Windows 10 error: This share requires the obsolete SMB1 protocol, which is unsafe and could expose your system to attack. Your system requires SMB2 or higher

In this case, neighboring computers may not be displayed on the local network, and when opening a shared folder by the UNC path, error 0x80070035 may appear.

The error message clearly shows that the network shared folder only supports the SMBv1 client access protocol. In this case, you should try to reconfigure the remote SMB device to use at least SMBv2 (the correct and safe way).

If you use Samba server on Linux to share files, you can specify the minimum supported version of SMB protocol in the smb.conf file like this:

[global]
server min protocol = SMB2_10
client max protocol = SMB3
client min protocol = SMB2_10
encrypt passwords = true
restrict anonymous = 2

On Windows 7/Windows Server 2008 R2, you can disable the SMB 1 protocol and enable SMBv2 through the registry with the following PowerShell commands:

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 –Force
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 1 –Force

On Windows 8.1/Windows Server 2012 R2, you can disable SMBv1, allow SMBv2 and SMBv3 with the following command (verify that a private or domain profile is used for your network connection):

Disable-WindowsOptionalFeature -Online -FeatureName "SMB1Protocol"
Set-SmbServerConfiguration –EnableSMB2Protocol $true

If your network device (NAS, Windows XP, Windows Server 2003) supports only the SMB1 protocol, you can enable a separate SMB1Protocol-Client feature on Windows 10/11 or Windows Server. But this is not recommended!!!

If the remote device requires SMBv1 to connect, and this protocol is disabled on your Windows device, an error appears in the Event Viewer:

Log Name: Microsoft-Windows-SmbClient/Security
Source: Microsoft-Windows-SMBClient
Event ID: 32000
Description:  SMB1 negotiate response received from a remote device when SMB1 cannot be negotiated by the local computer.

Run the elevated PowerShell prompt and verify that the SMB1Protocol-Client is disabled (State: Disabled):

Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Client

Enable the SMBv1 client protocol (a reboot is required):

Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Client

Get-WindowsOptionalFeature - get SMB1Protocol-Client state

You can also enable/disable additional features in Windows 10 and 11 from the optionalfeatures.exe. Expand SMB 1.0/CIFS File Sharing Support and enable the SMB 1.0/CIFS Client.

windows 11 enable smb1 cifs client protocol via features

On Windows 10 1809 and newer, the SMBv1 client is automatically removed if it has not been used for more than 15 days (the SMB 1.0/CIFS Automatic Removal component is responsible for this).

In this example, I enabled only the SMBv1 client. Do not enable the SMB1Protocol-Server feature if your computer is not used by legacy clients as an SMB server to host shared folders.

After installing the SMBv1 client, you should be able to connect to a shared folder or printer without any problems. However, you should understand this workaround is not recommended, because it reduces the security of your computer.

Windows Cannot Access Shared Folder: You Don’t Have Permissions

When connecting to a shared network folder on a remote computer, an error may appear:

Network Error
Windows cannot access \\PC12\Share
You do not have permission to access \\PC12\Share. Contact your network administrator to request access.

Windows cannot access share You do not have permissions to access

When this error occurs, you need to:

  1. Make sure that the user you are using to access the shared folder is granted access permissions on the remote share. Open the properties of the shared folder on the server and make sure your user has at least read permissions. Also,  you can check the SMB file share permissions on the remote host using PowerShell:
    Get-SmbShareAccess -Name "tools"
    Then check the NTFS folder permissions:
    get-acl C:\tools\ |fl  powershell: check shared folder and ntfs permissionsIf necessary, edit the permissions in the folder and/or share properties;
  2. Make sure you are using the correct username and password to access the network folder. If you’re not prompted for a username and password, try removing saved (cached) credentials for remote shares in Windows Credential Manager. Run the command rundll32.exe keymgr.dll, KRShowKeyMgr and delete cached credentials for the remote computer you are trying to access. remove stored credentials to access remote shared folders
    The next time you connect to the shared folder, you will be prompted for a username and password. Specify the credentials to access the network shared folder on the remote computer. You can save it in Credential Manager or add it manually.

Other Fixes: Windows Cannot Access Shared Folders

This section provides additional ways to troubleshoot a problem opening network folders in Windows:

  • Make sure that the remote computer allows incoming connections to shared network folders using the SMB protocol (TCP port 445). You can check the availability of port 445 on a remote computer using the Test-NetConnection command: Test-NetConnection -ComputerName HomePC212 -Port 445 powershell check smb 445 port open to access shared folders
    If the cmdlet returns TcpTestSucceeded : False, this means that access to the network folder on the remote computer is being blocked by the firewall. The connection may be blocked by an antivirus or firewall (third-party or built-in Windows Defender Firewall). If you are using Windows Defender, enable the File and Printer Sharing rule (Control Panel\System and Security\Windows Defender Firewall\Allowed apps\Allow apps to communicate through Windows Firewall) on the file share host for all three network profiles. windows defender firewall: allow file and printer sharing access
    Or create a firewall rule with PowerShell: New-NetFirewallRule -DisplayName "Allow_SBM-FileSharing_In" -Direction Inbound -Protocol TCP –LocalPort 445 -Action Allow
  • If you cannot open mapped network drives (folders), try to remove saved cached credentials in Windows Credential Manager, delete mapped network drives (with the Net Use * /delete command) and reconnect them;
  • Try to use the IP address of the remote computer instead of its name to access the folder. For example: Win+R -> \\192.168.12.20 -> Ok.
  • Make sure your computers are joined to the same workgroup. The name of the workgroup on the computer can be found using PowerShell: Get-WmiObject Win32_ComputerSystem).domain
  • Reset the TCP/IP stack settings and update the IP address on your computer:
    netsh int ip reset
    netsh winsock reset
    ipconfig /flushdns
    ipconfig /release
    ipconfig /renew

19 comments
8
Facebook Twitter Google + Pinterest
previous post
How to Clean Up or Reset COM Port Numbers in Windows
next post
Grep in PowerShell Using the Select-String Cmdlet

Related Reading

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

Installing Language Pack in Windows 10/11 with PowerShell

September 15, 2023

How to View and Change BIOS (UEFI) Settings...

September 13, 2023

19 comments

Digi July 6, 2018 - 7:41 am

I had such an error then accessing NAS share from Windows 10 1803:
“You can’t connect to the file share because it’s not secure. This share requires the obsolete SMB1 protocol, which is unsafe and could expose your system to attack.”
The problem was solved by installing the SMB v1 Client. Thank you!

Reply
Rajasekar October 12, 2018 - 3:35 am

Thank you sir

Reply
William Jack Albertsen January 24, 2019 - 7:17 am

Thank so much. It useful for me. 🙂

Reply
Mathurankan March 18, 2019 - 5:42 pm

Thank you

Reply
SJM September 6, 2019 - 8:29 pm

I had to ‘Enable insecure guest logons’ to acces my local qnap share.
Really useful information but now I am unsure on why it is insecure and what to do.
I will Google it 😉

(using uptodate w10 x64)

Reply
yakkup April 22, 2020 - 10:22 am

hello sir in my windows server standard 2008 (workgroup) sharefolder not connect any other pc , if run -cmd icheck sharing file showing on this last three yaers working suddenly stop , i check other pc windows 7 share folder its working even server2008 system also file open but only server system only not connet : error message : Check the spelling of name otherwise there might be a problem with your network – Error 0x80070035

Reply
Saroj December 22, 2020 - 6:55 am

I have done this work… But after shutdown my pc and connect this network driver … Can’t accessable…

Reply
Jaydee February 21, 2021 - 8:15 pm

Hello.
I try all of the ways noticed into this page but problem not solved for me.
My win 10 after updating to 20h2 my share folders,map drive and sharing get down.
Gpedit.lanman workstation
Regedit. Unauthorized client login
Network and sharing.turn on net discovery
And….
So many things ive done but problem not solved.
How can i solve the problem?
Thank you all.

Reply
Jaydee February 23, 2021 - 5:47 am

Solved
I Never see this solution!!!
Regedit address
Computer\hkey_local_machine\system\currentcontrolset\services\lanmanworkstation\parameters\
AllowinsecureGuestAouth
Set 1 hexadesimal

I see this solution everywher:
Regedit address:
Computer\hkey_local_machine\software\policies\microsoft\windows\lanmanworkstation
AllowinsecureGuestAouth
Set 1 hexadesimal
Goodluck everybody

Reply
alireza March 2, 2021 - 5:50 am

thank you jay dee
very nice

Reply
ST3 March 6, 2021 - 9:46 pm

Thank you! This finally worked for me!

Reply
fB February 24, 2021 - 2:08 pm

That#s it after 4 hours!
Thank You

Reply
Nathan February 28, 2022 - 7:43 pm

My work got new servers and computers, on the old windows 10 machines the network drive can be mapped just fine, but with the 11 machines it will not authorize our login with the credentials we currently have.

It’s locking us up for work purposes, can’t access job files nor can we save/overwrite files, it is very frustrating.

Please any insight would be much appreciated.

Reply
admin March 3, 2022 - 6:20 am

Are you using an AD domain network or a workgroup environment?
Please specify on which device the network shared folders are located

Reply
luciand April 2, 2022 - 6:13 pm

Thank You for the work for this post. It was helpfull for me!

Reply
Leon September 28, 2022 - 6:42 am

Searching all day why this new windows 10 pc could not access the nas. It worked webbased but not with the explorer.
After installing numerous drivers (not working) I finally found this page…
Turning SMB Client on did it.

Thanks

Reply
Cliff October 4, 2022 - 2:17 pm

Thank-you Sir, turning on SMB Client in Windows 10 did the job perfectly for me, allowing me to access a samba share on a networked pi after hours and hours of checking config files and pulling my hair out 🙂

Reply
dk May 11, 2023 - 6:33 am

My problem is that clients from other subnets are not able to connect to shares using Netbios over TCP/IP. The problem appeared with network scanners, which scan documents and save the copies to the network share (SMB) on a server.
Some of security update (maybe KB3165191) restricts NETBIOS connections outside local subnet. Thus, network features depending on NETBIOS (like SMB over NETBIOS, ports 137-139) will not work for the clients of other subnets. Common SMB protocol (port 445) is available in both directions.
For a 1 year now I have been searching for the answer to NT can’t map 2016 server share. The following registry change works:
– Create a Dword parameter with the name AllowNBToInternet and value 1 (after installation of the update it is set to 0) in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters

Or use the command:
reg add "HKLM\System\CurrentControlSet\Services\NetBT\Parameters" /v "AllowNBToInternet" /t REG_DWORD /d 1 /f

Reply
dk June 26, 2023 - 2:42 pm

Windows 10 LTSC does not see SMB3 shares.
Fix:
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters /v AllowInsecureGuestAuth /t REG_DWORD /d 1 /f
sc config mrxsmb10 start=disabled
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters /v SMB1 /t REG_DWORD /d 0 /f
sc config fdPHost start=auto
sc config FDResPub start=auto
enable web service discovery = yes

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023
  • How to Use Ansible to Manage Windows Machines

    September 25, 2023
  • Installing Language Pack in Windows 10/11 with PowerShell

    September 15, 2023
  • Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

    September 14, 2023
  • How to View and Change BIOS (UEFI) Settings with PowerShell

    September 13, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Allow Multiple RDP Sessions on Windows 10 and 11
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • How to Run Program without Admin Privileges and Bypass UAC Prompt
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows
  • Fixing ‘The Network Path Was Not Found’ 0x80070035 Error Code on Windows
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top