This document details the PowerShell configurations needed to resolve Access Denied errors when connecting Windows 11 clients to Linux SMB (Samba) network shares.
Recent Windows 11 updates, especially version 24H2, enforce stricter security defaults that can block compatibility with standard Linux share configurations.
Windows 11 now mandates SMB signing by default. Most Linux Samba servers do not support this requirement, which can lead to connection rejections. Run the following command to disable the mandatory requirement on the client:
Set-SmbClientConfiguration -RequireSecuritySignature $false -Force
If the Windows machine is also hosting shares, you may need to disable this on the server side as well:
Set-SmbServerConfiguration -RequireSecuritySignature $false -Force
By default, Windows 11 blocks unauthenticated guest access to network shares. If your Linux share does not require a username and password, explicitly allow this behavior:
Set-SmbClientConfiguration -EnableInsecureGuestLogons $true -Force
Confirm that the settings were applied correctly by running:
Get-SmbClientConfiguration | Select-Object RequireSecuritySignature, EnableInsecureGuestLogons
Expected output:
RequireSecuritySignature: FalseEnableInsecureGuestLogons: TrueIf the error persists after applying the PowerShell configurations, check the following common authentication conflicts.
Windows may try to use cached credentials that do not match the Linux server’s expectations.
Clear cached credentials:
cmdkey /list
cmdkey /delete:TargetName
Reconnect to the share and explicitly enter the Linux username and password.
Note: You must use the actual Linux user password. Windows PINs and Windows Hello biometrics are not valid for network share authentication.
In some environments, IPv6 routing issues can cause SMB negotiation failures.
ncpa.cpl).If the Linux server uses older authentication methods, adjust the local security policy:
secpol.msc.If you are sharing a folder from a Windows 11 computer and want simple local-network access, you can grant the share to Everyone or use guest-style access on a trusted private network. This is separate from SMB client settings and must be configured on the computer that is hosting the share.
If the goal is to allow access without a user name and password, open Control Panel > Network and Sharing Center > Change advanced sharing settings and turn off Password protected sharing for the private profile.
That setting makes the share behave more like a guest share on a trusted LAN, but it also reduces security and may not be permitted by all clients.
If you want passwordless SSH access from one Windows 11 computer to another, the setup is different from SMB. You need an SSH server on the destination machine, an SSH client on the source machine, a public/private key pair, and the public key installed for the target user account.
sshd service on the destination computer and set it to start automatically.22 through the Windows Defender Firewall on the destination computer.ssh-keygen.authorized_keys file.ssh and confirm that the private key is used instead of a password.On the source computer, generate a key pair if you do not already have one:
ssh-keygen -t ed25519 -C "your_name@source-computer"
Copy the public key from the source computer to the destination computer and place it in the target user’s SSH folder:
New-Item -ItemType Directory -Force $env:USERPROFILE\.ssh
notepad $env:USERPROFILE\.ssh\authorized_keys
Paste the contents of the source computer’s .pub file into authorized_keys, then save the file.
If you are connecting to an account that is a member of the local Administrators group, Windows may instead use:
C:\ProgramData\ssh\administrators_authorized_keys
From the source computer, connect to the destination computer with:
ssh destination-username@destination-hostname-or-ip
If the key is set up correctly, SSH should authenticate without prompting for the account password.
sshd service is not running on the destination computer.22 is blocked by the firewall or by network policy.authorized_keys are too open.Disabling SMB signing and enabling guest logons reduces the security posture of the Windows client. Apply these changes only on trusted internal networks.
SSH key authentication is safer than password-only access, but it still depends on protecting the private key on the source computer.
Do not apply these settings to devices connected to public or untrusted networks, as this increases exposure to man-in-the-middle and relay attacks.