3

I have got a sub directory of a shared directory that I use Samba with and have set it to be accessible by only one user:

$ cd /mnt/SomeSambaShare 
$ ls -lad SomeDir
drwx--S--- 23 SomeUser SomeGroup 4096 2012-07-26 07:44 SomeDir

I cannot access this directory as a linux user other than SomeUser.

But I still can access this directory using a different Samba user than SomeUser. Why is that? And how do I prevent this?

2
  • Could you provide the relevant lines from your smb.conf? I assume you can do some tweaking there.
    – qbi
    Jan 15, 2013 at 17:16
  • This question appears to be abandoned and really unanswered, if you are experiencing a similar issue please ask a new question with details pertaining to your problem. If you feel this question is not abandoned, please flag the question explaining that. Jan 18, 2013 at 2:07

2 Answers 2

0

Try adding this line in your /etc/samba/smb.conf file and restarting samba.

[SomeSambaShare]
valid users = SomeUser
1
  • 1
    I don't want to restrict access to the share but to a subdirectory of a share. The share itself is pretty much available to every user on the network.
    – dummzeuch
    Sep 18, 2012 at 18:15
0

[global]

invalid users = root bin daemon adm sync shutdown \
                    halt mail news uucp operator
auto services = dave peter bob

I would think you could put them in the invalid users list or create an invalid users list in the section you need to restrict.

Not the answer you're looking for? Browse other questions tagged .