Koozali.org: home of the SME Server

Hide unreadable ibays in samba

PsyDuck

Hide unreadable ibays in samba
« on: December 15, 2004, 04:52:32 PM »
Hi!

I've searched the site but without success.

I would like to hide all samba shares that the user can't access. Anyone that know how to do this in an easy way?
As of know all shares are shown when browsing, but only the shares with the right group/user permissions can be 'opened'.

Black

Hide unreadable ibays in samba
« Reply #1 on: December 16, 2004, 02:36:41 PM »
so you want them to dissapear?

PsyDuck

Hide unreadable ibays in samba
« Reply #2 on: December 16, 2004, 02:39:37 PM »
For people that hasn't got enough permission...yes!

mbachmann

Hide unreadable ibays in samba
« Reply #3 on: December 16, 2004, 02:43:11 PM »
I bet there is an entry for that in smb.conf called "visible = yes/no" or similiar.

PsyDuck

Hide unreadable ibays in samba
« Reply #4 on: December 16, 2004, 02:59:16 PM »
I believe so too....but I haven't been able to pinpoint teh correct parameter and were hoping that someone in this forum knew.

bmph8ter

Hide unreadable ibays in samba
« Reply #5 on: December 17, 2004, 02:17:15 AM »
Quote from: "mbachmann"
I bet there is an entry for that in smb.conf called "visible = yes/no" or similiar.


That's pretty close.  It's actually browseable though.  If you look in your existing smb.conf in the [homes] section, you should see a line like:
Code: [Select]
browseable = no this is what you should need to use to hide share from users that don't have access rights to it.

mbachmann

Hide unreadable ibays in samba
« Reply #6 on: December 17, 2004, 10:27:02 AM »
bmph8ter has pinpointed the parameter for you, Psyduck. There you go, tell us if it's working as you desire.

arthurhanlon

Hide unreadable ibays in samba
« Reply #7 on: August 19, 2006, 04:22:25 PM »
How would this be incorporated into version 7 templates?

Cheers,
Arthur

Offline raem

  • *
  • 3,972
  • +4/-0
Hide unreadable ibays in samba
« Reply #8 on: August 20, 2006, 11:15:20 AM »
arthurhanlon

> How would this be incorporated into version 7 templates?

I'm looking at a sme6, but sme7 should be pretty much the same.
The general concept would be:

where ibayname = ibay you want to hide

cp /etc/e-smith/templates/etc/smb.conf/50homes /etc/e-smith/templates-custom/etc/smb.conf/50ibayname
pico /etc/e-smith/templates-custom/etc/smb.conf/50ibayname

change
[home]
to
[ibayname]
comment = ibayname ibay
browseable = no
path = /home/e-smith/files/ibays/ibayname

and save

/sbin/e-smith/expand-template /etc/smb.conf
/etc/init.d/smb restart
...

arthurhanlon

Hide unreadable ibays in samba
« Reply #9 on: August 20, 2006, 08:05:07 PM »
Ray, thanks for the replay, I know this is an old post that i have re-opened.

What you've said makes perfect sense to me and am just starting to get my head around the templating system of SME. Very ingenius  :-D

The one thing that is confusing me is this. The template fragments for the smb.conf file seem to stored in /etc/e-smith/templates/etc/smb.conf/ but the actual smb.conf file is located at /etc/samba/smb.conf or so it appears.

I tried creating /etc/e-smith/templates-custom/etc/samba/smb.conf/ directory and adding fragments to there but when expanding the template and restarting smb, nothing seems to have happened and the smb.conf file located at /etc/samba/smb.conf doesn't seem to have changed.

I'm stumped, any ideas?

Thanks,
Arthur

Offline raem

  • *
  • 3,972
  • +4/-0
Hide unreadable ibays in samba
« Reply #10 on: August 20, 2006, 08:29:00 PM »
arthurhanlon

>...but the actual smb.conf file is located at /etc/samba/smb.conf

This was mentioned recently in the forums. I think that one is not used.

I think the one that is used is at
/etc/smb.conf
My instructions work OK on a sme6 server.
...

arthurhanlon

Hide unreadable ibays in samba
« Reply #11 on: August 21, 2006, 12:09:48 PM »
Sorry Ray, not searching again, forgive me ;-)

I'll keep playing around with it (testing in VMWare at the moment) and see what results I get.

Thanks again,
Arthur