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

simon ben guy20034u at yahoo.com
Sat Oct 13 14:58:20 MDT 2012

Dear All,

As I have a issue to display only those shares the users have access too..
i am really trying to find a solution and came across a post 


its about the include statement 

this would exactly achieve my purpose but when I did that as I could put 
browseable = no in my kmplan section of my smb.conf file

browseable = yes in the include file 

testparm says 
Can't find include file /etc/samba/%G.conf 
i did try with other variables like u or U but its the same

Appreciate your help



--- On Thu, 10/11/12, simon ben <guy20034u at yahoo.com> wrote:

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

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


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

        comment = Home Directories
        read only = No
        browseable = No

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

        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



--- 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.

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
  ☎ +49-551-370000-0, ℻ +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

More information about the samba mailing list