Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 3839  / 2 Years ago, wed, march 23, 2022, 4:04:18

My Linux system has two users, and I configured samba on it, so some shared directories are accessible by both uses, and some are accessible by one of them.



The problem is when I access the computer from Windows clients and authenticate using the second user (with less permission), the folders which are not accessible are shown (although they are not browsable), how can I hide these folders from this user?



Here is a part of /etc/samba/smb.conf file:



[anonymous]
path = /repo/samba/anonymous
writeable = yes
browseable = yes
valid users = user1, user2

[archive]
path = /repo/samba/archive
writeable = no
browseable = yes
valid users = user1, user2

[user1]
path = /repo/samba/user1
writeable = yes
browseable = yes
valid users = user1

[user1-ro]
path = /repo/samba/user1-ro
writeable = no
browseable = yes
valid users = user1


When user2 tries to access the server, they see user1 and user1-ro folders too, and I want to hide these two for them.



I shall mention that the linux system runs Ubuntu-MATE 16.04.


More From » permissions

 Answers
0

I'm not sure why but @techraf answer didn't work (although according to docs it should), but I found another solution and it worked. I've added



access based share enum = true


to /etc/samba/smb.conf file.


[#12865] Wednesday, March 23, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tudatchful

Total Points: 270
Total Questions: 109
Total Answers: 122

Location: Palau
Member since Tue, May 30, 2023
1 Year ago
;