[Samba] How can I show only the shares that user have access to in SAMBA

simon ben guy20034u at yahoo.com
Thu Oct 11 14:04:19 MDT 2012


Dear Bjorn,

Indeed so grateful for your quick reply

I was indeed using earlier samba

actually I just installed it using yum.

now I did upgrade samba to recent one
samba 3.6.8 and after running the testparm command displayed no errors

but still I was not able to achieve my goal

as christian mentioned in his reply i do think his mistaken cause there are many guys whos post i see and they have solved it by adding just his 2 below command in their smb.conf file
hide unreadable = Yes
hide unwriteable files = Yes

Is there anything I could look into
as I mentioned before I have used webmin to create both local and samba users whos user names are the same and so also groups

here below my smb.conf

----

[global]
        workgroup = MYGROUP
        server string = Samba Server Version %v
        disable spoolss = Yes
        domain master = No
        idmap config * : backend = tdb
        cups options = raw

[homes]
        comment = Home Directories
        read only = No
        browseable = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        print ok = Yes
        browseable = No

[kmplan]
        comment = masterplan testing directory
        path = /opt/network/testplan
        valid users = @localgrp
        write list = @localgrp
        read only = No
       hide unreadable = Yes
       hide unwriteable files = Yes
        access based share enum = Yes

also here below are the permissions of /opt/network/testplan directory

drwxrws--T 3 root localgrp 4096 Oct 10 19:39 testplan


Actually every things works fine what I mean is

if I log in as a user who belongs to localgrp I can read/write the kmplan share which is perfect

but when i log in as user who does not belong to localgrp i can see the kmplan share although i cannot access it.

as christian said i can hide the share but even for valid users the share is hidden n i obviously dont want to hide the share for valid users

regards

simon






--- On Thu, 10/11/12, Björn JACKE <bj at SerNet.DE> wrote:

From: Björn JACKE <bj at SerNet.DE>
Subject: Re: [Samba] How can I show only the shares that user have access to in SAMBA
To: "simon ben" <guy20034u at yahoo.com>
Cc: samba at lists.samba.org
Date: Thursday, October 11, 2012, 2:10 AM

On 2012-10-11 at 01:22 -0700 simon ben sent off:
> but when I do a testparm it gives a error
> -------------------------------
> [root at kmshare samba]# testparm /etc/samba/smb.conf
> Load smb config files from /etc/samba/smb.conf
> Unknown parameter encountered: "access based share enum"
> Ignoring unknown parameter "access based share enum"

then your Samba version is too old then. This parameter was introduced with
Samba 3.6 I think (maybe 3.5 already). On http://www.enterprisesamba.org you
might find recent packages for your distribution that support that feature.

Cheers
Björn
-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
  ☎ +49-551-370000-0, ℻ +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen


More information about the samba mailing list