2

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

3 Answers 3

1

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

1

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.

0

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

or

Search "samba user" in any search engine.

You must log in to answer this question.