Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

3 Answers

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
add comment

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
add comment

http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/ServerType.html#id2559114

or

Search "samba user" in any search engine.

share|improve this answer
add comment

Your Answer

 
discard

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