If your users aren't able to authenticate to Samba, chances are you forgot one very important step. Jack Wallen shows you what to do to allow users to gain access to those shares.
I don't know how many times I've had people reach out to me to say, "Help, I can't get users to successfully authenticate against a Samba share! What do I do?" After years of helping people with this issue, the answer is pretty rote by now. To most people's surprise, the resolution to this problem is quite simple. What it is? You have to add and enable the users, such that Samba knows they exist.
What? Wait! The users are there on the system. They can log into their accounts on the Samba server. Shouldn't that be enough? In a word, no. Even though the system is aware of the users, Samba is not. But don't worry, the solution can be solved with two easy commands. Here's what you do.
Open up a terminal window on your Samba server (or just log in, if it's a headless machine) and issue the following command sudo smbpasswd -a USER (where USER is the username to be added). You will be prompted to enter and verify a new password for the user. Next issue the command sudo smbpasswd -e USER and the user will be enabled for Samba shares.
When the user attempts to authenticate to a Samba share, it'll now actually work.
This is one of those often overlooked steps that can drive a Samba administrator crazy. Make sure to always add and enable users for Samba, otherwise, no matter what you do, they won't be able to log into those shares.
- How to connect to Linux Samba shares from Windows 10 (TechRepublic)
- How to protect Samba from the SambaCry exploit (TechRepublic)
- How to enable Linux machines to resolve Windows hostnames (TechRepublic)
- How to set up Samba shares for groups (TechRepublic)
- How to configure Ubuntu Linux server as a Domain Controller with samba-tool (TechRepublic)
- New and improved Samba file server released (ZDNet)