Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: PsyDuck on December 15, 2004, 04:52:32 PM

Title: Hide unreadable ibays in samba
Post by: PsyDuck 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'.
Title: Hide unreadable ibays in samba
Post by: Black on December 16, 2004, 02:36:41 PM
so you want them to dissapear?
Title: Hide unreadable ibays in samba
Post by: PsyDuck on December 16, 2004, 02:39:37 PM
For people that hasn't got enough permission...yes!
Title: Hide unreadable ibays in samba
Post by: mbachmann 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.
Title: Hide unreadable ibays in samba
Post by: PsyDuck 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.
Title: Hide unreadable ibays in samba
Post by: bmph8ter 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.
Title: Hide unreadable ibays in samba
Post by: mbachmann 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.
Title: Hide unreadable ibays in samba
Post by: arthurhanlon on August 19, 2006, 04:22:25 PM
How would this be incorporated into version 7 templates?

Cheers,
Arthur
Title: Hide unreadable ibays in samba
Post by: raem 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
Title: Hide unreadable ibays in samba
Post by: arthurhanlon 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
Title: Hide unreadable ibays in samba
Post by: raem 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.
Title: Hide unreadable ibays in samba
Post by: arthurhanlon 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