Samba/SMB Errors — Windows File Sharing from Linux Troubleshooting
Warningnetwork
Overview
Fix Linux Samba errors including share access denied, Windows 10/11 compatibility issues, SMB version conflicts, and samba service configuration problems.
Key Details
- Samba provides SMB/CIFS file sharing between Linux and Windows systems
- Configuration file: /etc/samba/smb.conf defines shares, authentication, and protocol settings
- Samba users are separate from Linux users — must be created with smbpasswd -a username
- Windows 10/11 may require SMB2 or SMB3 minimum — SMB1 is disabled by default in Windows
- testparm validates smb.conf syntax and shows the effective configuration
Common Causes
- Samba user not created (system users are not automatically Samba users)
- Windows requiring SMB2+ but Samba configured for SMB1 only
- Share path permissions not allowing the Samba user read/write access
- Firewall blocking SMB ports (TCP 445, TCP 139, UDP 137-138)
- SELinux/AppArmor blocking Samba access to the shared directory
Steps
- 1Create Samba user: sudo smbpasswd -a username (user must exist as a system user first)
- 2Test configuration: testparm to validate smb.conf syntax
- 3Restart Samba: sudo systemctl restart smbd nmbd
- 4Set minimum protocol: add 'min protocol = SMB2' to [global] in smb.conf
- 5Fix directory permissions: chmod 2775 /share && chown user:sambashare /share
- 6Fix SELinux: chcon -t samba_share_t /share -R or setsebool -P samba_enable_home_dirs on
Tags
sambasmbfile-sharingwindowscifs
Related Items
More in Network
windows-651-pppoe-connection-failedWindows Error 651 — PPPoE Connection Failed
Warningwindows-691-authentication-failedWindows Error 691 — Authentication Failed
Warningwindows-720-ppp-connection-failedWindows Error 720 — PPP Connection Failed
Errorwindows-800-vpn-tunnel-failedWindows Error 800 — VPN Tunnel Failed
Warningwindows-network-error-619Windows VPN Error 619 — Connection Could Not Be Established
Warningwindows-network-error-868Windows VPN Error 868 — Remote Server Not Resolved
WarningFrequently Asked Questions
Windows 11 requires SMB2 minimum. Add 'min protocol = SMB2' to [global] in smb.conf. Also ensure the Samba user has a password set with smbpasswd.