Trying to setup a samba server with no credentials, however none of the configurations is working, my w11 still claims that I need username and password
I do not have any personal experience, so I asked Google Gemini, and it gave me the long answer, with step-by-step instructions, quoted below.
Hope these might help you.
Tony
==========================
Yes, Samba can be set up to work with no credentials (anonymous or “guest” access) for Windows 11, but it requires configuration changes on both the Samba server and the Windows 11 client because Windows 11 defaults to blocking this insecure guest access.
Microsoft strongly disables “insecure guest logons” by default in recent versions of Windows 10 and Windows 11 for security reasons, so you have to manually override this setting on your Windows machine.
1.
Samba Server Configuration
On your Samba server (e.g., Linux machine), you need to configure the share for guest access. This is typically done by adding or modifying parameters in the /etc/samba/smb.conf file.
Example Global and Share Settings
In the [global] section, you’ll need to map unauthenticated attempts to the guest account:
[global]
# Maps unknown users to the 'guest' user
map to guest = Bad User
# Other necessary global settings (e.g., workgroup, server role, protocols)
# Recommended minimum protocol to use with Windows 11 is SMB2 or SMB3
min protocol = SMB2
For the specific share you want to allow anonymous access to, use:
[public_share]
comment = Anonymous Access Share
path = /srv/samba/public
# Allow anonymous access
guest ok = yes
# Only allow guest access (optional, but good for security)
guest only = yes
# Read/Write or Read-only
read only = no
# Force the 'guest' user to be 'nobody' or similar for permissions (optional)
force user = nobody
force group = nogroup
After changing the smb.conf file, you must restart the Samba service (e.g., sudo systemctl restart smbd nmbd).
2.
Windows 11 Client Configuration
This is the most crucial step, as Windows 11 actively blocks connections that attempt to use guest access by default. You need to enable “insecure guest logons” on your Windows 11 machine.
Method A: Using Local Group Policy Editor (Windows 11 Pro/Enterprise)
Press Windows Key + R, type gpedit.msc, and press Enter.
-
Navigate to: Computer Configuration > Administrative Templates > Network > Lanman Workstation.
-
Find the setting “Enable insecure guest logons” and double-click it.
-
Change the status to Enabled.
-
Click Apply and OK.
Method B: Using PowerShell (Windows 11 Home or alternative)
-
Search for PowerShell, right-click it, and choose Run as administrator.
-
Execute the following command and press Y when prompted:
PowerShell
Set-SmbClientConfiguration -EnableInsecureGuestLogons $true
Method C: Using Registry Editor (Alternative to Group Policy)
-
Press Windows Key + R, type
regedit, and press Enter. -
Navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters -
Look for a DWORD (32-bit) Value named
AllowInsecureGuestAuth. -
If it doesn’t exist, create it (New > DWORD (32-bit) Value) and name it
AllowInsecureGuestAuth. -
Double-click it and set the Value data to 1.
-
Close the Registry Editor.
After applying any of the above Windows configurations, you must restart your Windows 11 computer for the change to take effect.
Security Warning: Enabling “insecure guest logons” significantly reduces the security of your Windows 11 computer as it allows connections without any authentication. This should only be done in a trusted, isolated home network and is not recommended for environments where security is critical.
Ill post my samba script if u want it. Also to enable wssd. With the smb protocol it depends hiw old your router is. Example. My dads router is old and the only way to access its usb drive is to enable COREPLUS which tells the HW (router ) to communicate with its lowest/highest smb protocol. If i set it to anything smb 2+ my linux boxs arnt able to browse it. So thats something to consider.
With my config your able to right click and share any folder. Ive been implementing the same script almost on all my linux boxes from lmde7, fedora workstation kde, solus, rocky,nixos to Aurora kde (brilliant platform) with zero issues.
And yes smbd can still use COREPLUS and smb1
As it transpoired, it was Windows and Insecure Logons, that was the culprit, seems to be introduced with 24H2
Either way i dont have time to read the politics i just want it to work and get on with it and off the pc