Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Samba : Restrict file sharing to particular user  (Read 1954 times)

0 Members and 1 Guest are viewing this topic.

jominj

  • Guest
Samba : Restrict file sharing to particular user
« on: December 26, 2013, 05:43:49 pm »
Restrict IP based access.

Open the smb.conf file add the ip to directive hosts allow = <ip>

Restrict the users

Open the smb.conf file add the users to the directive  valid users = user1 user2

Restricting Read and Write access to users.

Modify the following directive
read only = yes
write list = user1 user2

Example:
To restrict the access to Ip : 10.0.0.57 and restrict the write permission to user1

Open smb.conf file add the following lines
hosts allow = 10.0.0.57
valid users = user1, user2
read only = yes
write list = user1