Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to make users in samba but not in the system. how can i make them.

i have only one system user called userA and i want to make 3 different users can access samba shared folders

share|improve this question
up vote 1 down vote accepted

i don't know if it is still valid with newer versions of samba, but you can create a file in /etc/samba/ called smbusers where you map remote user names to system usernames.

the format of the file is so:

localuser = remoteuser, remoteuser2
localuser2 = remoteuser3

so remoteuser will have access to localuser's files, etc.

for example, if you set up one system samba user, and had a directory shared through samba as that user, you could have X remote users with their own passwords to map that drive, etc.

if that doesn't work, there's the option of created local users, and then locking the user accounts so they cannot log in. this can be accomplished by creating the user with useradd -M -s /bin/false username (creates a user with username 'username' and skips making a home directory, also sets the shell to /bin/false to prevent logging in) and then running usermod -L username

you can also do chsh username -s /bin/false to change the user's shell to something invalid, if locking the user account prevents them from accessing the smb share.

once you're done with that, it's as easy as smbpasswd -a username

share|improve this answer

Create the user on the system (adduser), then simply add them using smbpasswd -a username.As long as we are talking of a samba with local user and not an external authentication schemas (OpenLDAP for instance), it will work fine.

share|improve this answer


Search "samba user" in any search engine.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.