To access the samba share, please pay attention to:

  1. You had to create a system user with the same username. In this case, please issue the following command: useradd -s /sbin/nologin benjamin
  2. If you are using a SELINUX-enabled system (eg: CentOS), try to temporarily disable it issuing setenforce 0

EDIT: as the problem persists, try the following:

  1. maybe your Windows host is prepending your username with the wrong domain name. From the Windows machine, try to login using localhost\benjamin as the username
  2. issue pdbedit -L and check if user benjamin is listed. If so, set a trivial password (you can change it later) using smbpasswd benjamin
  3. if user benjamin is not listed, try to recreate it issuing smbpasswd -a benjamin
  4. if it does not work, delete the passwd file (it is named passwd.tdb; for reference, in a CentOS 6.x system it is found under /var/lib/samba/private/). Then, recreate your user issuing smbpasswd -a benjamin
  5. if it still not working, try to use the root account issuing smbpasswd -a root and check if you can login using the root user. Note: this is only a try. After having done with it, you must delete root's entry issuing smbpasswd -x root
  6. Your last resort is to increase the verbosity of logging and see if you can find clues there. For authentication attempts, edit or add the following line on your smb.conf log level = 2 winbind:5, check the logs with something like tail -f /var/log/samba/log* and try to login.
Answer from shodanshok on serverfault.com
🌐
Microsoft Learn
learn.microsoft.com › en-us › troubleshoot › windows-client › networking › access-denied-access-smb-file-share
Access Denied when you access Server Message Block (SMB) file share - Windows Client | Microsoft Learn
February 12, 2026 - When you try to access a specific folder that's located on a Network Appliance (NetApp) Filer or a Windows Server that supports SMB2 from a Windows-based system through the SMB Version 2 protocol, the access is denied.
🌐
Microsoft Learn
learn.microsoft.com › en-us › troubleshoot › windows-client › networking › cannot-access-shared-folder-file-explorer
Can't access shared folders from File Explorer - Windows Client | Microsoft Learn
... For more information, see Net use. Turn on the SMB 1.0 support feature from Control Panel by following these steps: Open Control Panel. Select Programs > Programs and Features > Turn Windows features on or off > SMB 1.0/CIFS File Sharing Support.
Top answer
1 of 7
14

To access the samba share, please pay attention to:

  1. You had to create a system user with the same username. In this case, please issue the following command: useradd -s /sbin/nologin benjamin
  2. If you are using a SELINUX-enabled system (eg: CentOS), try to temporarily disable it issuing setenforce 0

EDIT: as the problem persists, try the following:

  1. maybe your Windows host is prepending your username with the wrong domain name. From the Windows machine, try to login using localhost\benjamin as the username
  2. issue pdbedit -L and check if user benjamin is listed. If so, set a trivial password (you can change it later) using smbpasswd benjamin
  3. if user benjamin is not listed, try to recreate it issuing smbpasswd -a benjamin
  4. if it does not work, delete the passwd file (it is named passwd.tdb; for reference, in a CentOS 6.x system it is found under /var/lib/samba/private/). Then, recreate your user issuing smbpasswd -a benjamin
  5. if it still not working, try to use the root account issuing smbpasswd -a root and check if you can login using the root user. Note: this is only a try. After having done with it, you must delete root's entry issuing smbpasswd -x root
  6. Your last resort is to increase the verbosity of logging and see if you can find clues there. For authentication attempts, edit or add the following line on your smb.conf log level = 2 winbind:5, check the logs with something like tail -f /var/log/samba/log* and try to login.
2 of 7
12

It is possible you need to add the user in question to your smb service in linux

sudo smbpasswd -a myuser
🌐
TrueNAS Community
truenas.com › forums › archives › general help › general
SMB Share Access Denied on One Computer Windows 10 | TrueNAS Community
January 27, 2022 - Access denied from Windows can mean a lot of different things. Above user shows logs indicating guest account failing to access share path: ... ../../source3/smbd/service.c:169(chdir_current_service) chdir_current_service: vfs_ChDir(/mnt/share/employees) failed: Permission denied.
Top answer
1 of 3
1

If during the time that the replacement router was used, the Windows 10 computers have had some error in the credentials used, the first step should be to clean out the stored credentials.

Deleting Windows credentials is done in Control Panel > User Accounts > Credential Manager > Manage your credentials.

After the old credentials are cleaned out, you could again login to the network shares, to see if they now work as well as before.

If this doesn't help, then this is an error in Windows 10 that was introduced by some Microsoft update.

You could report the problem to Microsoft via the Feedback Hub, while for the present use the same password for server and clients. This is not an ideal situation, but it will work until a better solution is found.

2 of 3
0

This Microsoft document describes the issue:

Guest access in SMB2 and SMB3 disabled by default in Windows

If you want to enable insecure guest access, you can configure the following Group Policy settings:

Open the Local Group Policy Editor (gpedit.msc). In the console tree, select Computer Configuration > Administrative Templates > Network > Lanman Workstation. For the setting, right-click Enable insecure guest logons and select Edit. Select Enabled and select OK.

To set the value without using group policy, set the following following DWORD registry value to 1 (insecure guest auth enabled) or 0 (insecure guest auth disabled):

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters AllowInsecureGuestAuth

This helped me fix an issue where mapped drives would'nt reconnect after restarting Windows 10 machines.

🌐
Reddit
reddit.com › r/linuxquestions › samba share "access denied" on windows 10
r/linuxquestions on Reddit: Samba share "Access Denied" on Windows 10
August 29, 2020 -

Beating my head against the wall on this- I'm trying to set up a Samba share on a RPi and for whatever reason when I try to access it from Windows I get "access is denied". When I purposely try a wrong password I get a "username or password is incorrect"- so I know it's recognizing that the password is correct, just denies access for some reason.

My testparm -s output (Trying to access Passport):

# Global parameters
[global]
        log file = /var/log/samba/log.%m
        logging = file
        map to guest = Bad User
        max log size = 1000
        obey pam restrictions = Yes
        pam password change = Yes
        panic action = /usr/share/samba/panic-action %d
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        passwd program = /usr/bin/passwd %u
        server role = standalone server
        unix password sync = Yes
        usershare allow guests = Yes
        idmap config * : backend = tdb
        create mask = 0700
        directory mask = 0700
        valid users = %S


[printers]
        browseable = No
        comment = All Printers
        path = /var/spool/samba
        printable = Yes


[print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers


[Passport]
        comment = Passport
        guest ok = Yes
        path = /mnt/Passport
        read only = No
🌐
Reddit
reddit.com › r/raspberry_pi › help with samba share and windows 10 - "access is denied" but can access home directory.
r/raspberry_pi on Reddit: Help with Samba share and Windows 10 - "Access is denied" but can access home directory.
October 3, 2015 -

SOLVED

Steps in the end

Been breaking my head over setting up samba on my RPi2. I got my Pi last week and I set it up with no issues and then I had to reflash the SD card and start from scratch and I forgot to keep note of the steps and settings(my bad for not taking a backup, I know)

So I am facing an "Access is denied" error when trying to access from "Network" in Windows 10. I have tried with modifying group policy settings too but still the same. This is the samba.conf file :pastebin

As stated in the title, I can access the home directory, create files and folders there but as mentioned in the conf file, the other share usb is just stuck at enter password screen which I enter right every time. It just says "Access is denied."

It is a usb of ext4 format mounted at /mnt/usbd automounted at reboot.

It would be very helpful and would appreciate it if someone could guide me with what I am doing wrong.

Steps

  1. I purged samba and samba-common completely and removed the conf file too.

  2. Install samba and samba-common-bin and samba won't run as there's no conf file so copy smb.conf from usr/share/samba/smb.conf

  3. Now this is my new share file.pastebin Changes made:
    wins support = yes
    encrypt passwords = yes
    added the share in the end as opposed to in the middle of the file from before.

  4. Tested with smbtree and smbclient -L hostname

I sat up and read the samba docs for some time and started on the troubleshooting docs and tried step by step which helped me solve it. link

Thanks to everyone who tried to help me.

🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › networking
Windows 10/11 Samba file sharing - access denied [sort of solved but observations appreciated] - Linux Mint Forums
September 9, 2025 - Windows no longer "browses" it "discovers". It does that with WS-Discovery. You implement that in Linux by adding a package: ... How do I get in from the Win 10 machine? I have no idea. If it works for Win11 it should work for Win10. The only thing you didn't mention is the addition of the winaccess user to the samba password database: ... sudo smbpasswd -a winaccess Since you've made some odd changes to smb.conf you might want to post the output of the following commands so we can see how you are set up in it's entirety:
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › networking
Mint 19 Samba shares 'Access is denied' from Windows 10 (works in Mint 18) [SOLVED] - Linux Mint Forums
Linux Mint Forums · Welcome to the Linux Mint support forums · Skip to content · Quick links · Unanswered topics · Active topics · Search · Login · Register · Board index
Find elsewhere
🌐
Windows OS Hub
woshub.com › cannot-access-smb-network-shares-windows-10-1709
Can’t Access Shared Folders or Map Network Drives from Windows 10 and 11 | Windows OS Hub
March 16, 2024 - 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.
🌐
QNAP NAS Community Forum
forum.qnap.com › home › board index › general › file sharing › windows
[SOLVED] SMB login OK, Win 10 access denied - QNAP NAS Community Forum
October 14, 2020 - tdprb wrote: ↑Wed Oct 14, 2020 2:10 pm FIX:Added new hostname to "Microsoft Networking Host Access" under Privilege > Shared Folders > Edit Shared Folder Permission; Access granted after credential prompt.
🌐
Super User
superuser.com › questions › 1125555 › windows-10-shared-folder-acces-denied-was-working-before
network shares - Windows 10 shared folder: Acces Denied (was working before) - Super User
If your event logs show nothing at all then your client isn't even connecting to the machine at all and cannot be getting an "Access denied" error, more likely "Unreachable" or "Time out" ... a) In Network and sharing center file sharing (network discovery) must be enabled. Turn off password-protected sharing: first make it work simply, then make it work with password protection if necessary. b) In "Turn Windows features on and off" window (from Run: appwiz.cpl), under "SMB 1.0/CIFS File sharing support", SMB client and server must be enabled.
🌐
Medium
medium.com › tenable-techblog › smb-access-is-denied-caused-by-anti-ntlm-relay-protection-659c60089895
SMB “Access is denied” Caused by Anti-NTLM Relay Protection | by Clément Notin [Tenable] | Tenable TechBlog | Medium
January 30, 2024 - 2 = “Required from client” “The SMB client MUST send a SPN name in session setup, and the SPN name provided MUST match the SMB server that is being requested to establish a connection. If no SPN is provided by the client, or the SPN provided does not match, the session is denied.” · In our testing, we observed access denied errors in such a relay/NAT situation, with either the values of 1 or 2, because the Windows SMB client knows to provide the expected SPN.
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › using the raspberry pi › troubleshooting
Samba acces denied on windows 10 - Raspberry Pi Forums
.. then from PC you are accessing it as user = pi. Suggest you ceate a new share with owner = pi :=) Thank you for the suggestion but it wouldn't work ... Linux-permissions of you share may be wrong? SAMBA didn't give or create them, never, in none case! They have to exist independly ... May be, it could be useful to post contents of your /etc/samba/smb.conf or what ever the real name of you SAMBA-config is.
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 5491152 › smb-problems-enable
SMB problems/ enable - Microsoft Q&A
July 23, 2025 - If SMB features are missing or grayed out, Windows 10 Home might not allow full SMB server configuration—consider upgrading to Pro.
🌐
Ask Ubuntu
askubuntu.com › questions › 846301 › windows-10-cant-access-samba-share
16.04 - Windows 10 Can't access samba share - Ask Ubuntu
January 16, 2017 - I tried smbclient to login, but that also failed. The output: Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.11-Ubuntu] tree connect failed: NT_STATUS_ACCESS_DENIED
🌐
Windows Forum
windowsforum.com › forums › windows forums › windows tutorials
Fix Windows 10/11 Network Drive Access: Map SMB Share with Credentials + Reconnect | Windows Forum
February 28, 2026 - Key Takeaways: Clear old SMB sessions and wrong mappings before re-mapping (net use … /delete helps). Remove conflicting entries in Credential Manager so Windows doesn’t reuse the wrong login.
🌐
Cr0x
cr0x.net › networking & smb › smb share ‘access denied’: the one permission everyone misses
SMB Share ‘Access Denied’: The One Permission Everyone Misses – cr0x.net
February 23, 2026 - Symptom: User can open the folder when logged onto the server (RDP/console) but gets “Access Denied” over SMB. Root cause: Local access uses NTFS; SMB access uses share permissions + NTFS. The share gate blocks them. Fix: On Windows, run Get-SmbShareAccess and correct the share ACL.
🌐
TrueNAS Community
truenas.com › forums › archives › freenas (legacy software releases) › freenas help & support › sharing
SMB Windows Domain Users Access Denied after 11.3 Update | TrueNAS Community
February 3, 2020 - I'm just now getting into the debug process. ... Try clearing the idmap cache. midclt call idmap.clear_idmap_cache. This will stop samba, remove caches, and restart it (service disruption). ... Not sure if this helps but I certainly find it interesting. In Windows 10 if I "add a network location" ...