[Samba] Mapping user by ip address
Rowland Penny
rpenny at samba.org
Fri Oct 5 15:41:24 UTC 2018
On Fri, 5 Oct 2018 12:11:40 -0300
HugLeo via samba <samba at lists.samba.org> wrote:
> Hello, I have a shared folder that everybody will have access without
> user/password.
>
> [thsprovider]
> path = /share
> public = yes
> guest ok = yes
> only guest = yes
> writable = yes
> printable = no
> create mask = 0775
> directory mask = 0775
>
>
> However Inside /share folder I have a folder named private that can be
> accessed just for a ip address.
>
> I have created the folder /share/private.
> chown private:private /share/private
>
> In this way I negate everybody access. Now how to map ip address
> 192.168.0.10 to the private user?
>
> I need to continue accessing the /share root folder but If I try to
> access/modify just ip address 192.168.0.10 will have access.
>
> Something like:
>
> [thsprovider]
> path = /share
> force user = everybody
> force group = everybody
> path2 = /share/private
> force user = private
> force group = private
>
> Is that even possible?
Short answer: No
Long answer: Still no, because the only person who can access the share
is the guest user, no one else. This is because you have set 'only
guest = yes'
It also will not work because Samba has no concept of an ipaddress as a
user or group.
Set up two shares and investigate 'access based share enum'
Rowland
More information about the samba
mailing list