Koozali.org: home of the SME Server

HOWTO: Hide Primary i-bay!

dhani

HOWTO: Hide Primary i-bay!
« on: March 07, 2007, 08:29:21 PM »
template system is really awesome...  :)

I just found out how to hide the primary i-bay after searching and the entire forum and found more or less solutions for the problem.

After fiddle around with the smb.conf template, I came out with the really simple solutions (i think  :D ) and I thought I would share with the community.

1. mkdir -p /etc/e-smith/templates-custom/etc/smb.conf/ibays
2. cd /etc/e-smith/templates-custom/etc/smb.conf/ibays
3. vim 20browseable
Code: [Select]

{
if ($key eq 'Primary')
   {
       $OUT .= "browseable = no";
    }
}

4. expand-template /etc/smb.conf
5. service smb restart

done!

ps: I am new to using the sme, been awhile searching for nas (found out the freenas server, but it still lack the ACL system of managing user and share in their early release) for data center, and found the SME up to the task. good work guys!  :D

Offline jonic

  • *
  • 103
  • +1/-0
HOWTO: Hide Primary i-bay!
« Reply #1 on: March 08, 2007, 07:07:45 PM »
Good tip! I was looking for something like this myself.
But I think the code should be:
Code: [Select]

{
   if ($key eq 'Primary')
   {
       $OUT .= "browseable = no\n";
    }
}


Without the "\n" part I get in smb.conf:
Code: [Select]

browseable = noreadonly = no

Offline Stefano

  • *
  • 10,894
  • +3/-0
HOWTO: Hide Primary i-bay!
« Reply #2 on: March 09, 2007, 10:09:06 AM »
Quote from: "jonic"
Good tip! I was looking for something like this myself.
But I think the code should be:
Code: [Select]

{
   if ($key eq 'Primary')
   {
       $OUT .= "browseable = no\n";
    }
}


Without the "\n" part I get in smb.conf:
Code: [Select]

browseable = noreadonly = no


well.. I think we can have more..

mkdir /etc/e-smith/templates-custom/etc/smb.conf/ibays

pico 20browseable

Code: [Select]

{
   
 my $browseable = $ibay->prop('Browseable') || 'yes';

 $OUT .= "browseable = $browseable\n";
}



config accounts setprop MY_I-BAY Browseable no

expand-template /etc/smb.conf

HTH

ciao
Stefano

Offline byte

  • *
  • 2,183
  • +2/-0
HOWTO: Hide Primary i-bay!
« Reply #3 on: March 09, 2007, 10:42:52 AM »
Has anyone raised a New Feature Request (NFR) this may be of interest.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

dhani

HOWTO: Hide Primary i-bay!
« Reply #4 on: March 09, 2007, 12:37:01 PM »
I myself certainly vote for this options on ibay prop default...
where could i propose for the new feature request?!

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
HOWTO: Hide Primary i-bay!
« Reply #5 on: March 09, 2007, 12:45:56 PM »
In the bugtracker.
"It should just work" if it doesn't report it. Thanks!

Offline gtech

  • **
  • 24
  • +0/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #6 on: January 26, 2010, 02:11:23 PM »


well.. I think we can have more..

mkdir /etc/e-smith/templates-custom/etc/smb.conf/ibays

pico 20browseable

Code: [Select]
{
   
 my $browseable = $ibay->prop('Browseable') || 'yes';

 $OUT .= "browseable = $browseable\n";
}


config accounts setprop MY_I-BAY Browseable no

expand-template /etc/smb.conf

HTH

ciao
Stefano

Hi Stefano,

Been searching for a way to hide the "Primary" folder in the i-bays and came across the above post you commented on.

Being a total novice with Linux, how do you enter the "code" thats in the dark grey box above....OR....is there a simpler way of hiding the Primary folder ??

Many thanks

Graeme

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #7 on: January 26, 2010, 03:15:48 PM »
Good tip! I was looking for something like this myself.

Why? The files in the Primary i-bay are already visible to the world via http, and are only changeable via admin. What do you gain by "hiding" the folder in the Windows network?

Offline gtech

  • **
  • 24
  • +0/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #8 on: January 26, 2010, 03:33:07 PM »
Why? The files in the Primary i-bay are already visible to the world via http, and are only changeable via admin. What do you gain by "hiding" the folder in the Windows network?

Basically a bit of tidying up..... The users who will be accessing this are not really I.T literate, and its a case of if they see something, they play with it.  So I thought the simplest way was just not to make it visible or even there, we are not going to use it, and it will only lead to us having to give more explanations than is really necessary    :D

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #9 on: January 26, 2010, 05:16:58 PM »
Basically a bit of tidying up..... The users who will be accessing this are not really I.T literate, and its a case of if they see something, they play with it.  So I thought the simplest way was just not to make it visible or even there, we are not going to use it, and it will only lead to us having to give more explanations than is really necessary    :D

Seriously - how much "playing" can be done with a few empty read-only folders?

Offline gtech

  • **
  • 24
  • +0/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #10 on: January 26, 2010, 05:35:06 PM »
with SOME of the users, you give them and inch, and they take a mile, if you know what I mean.  If they can't be hidden then not an issue, I;ll live with it, would of just made things simpler to have them hidden.....Never mind, thanks anyway.

Graeme

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #11 on: January 26, 2010, 06:11:06 PM »
with SOME of the users, you give them and inch, and they take a mile, if you know what I mean. 

A mile is not there for the taking. They can't do anything but look. Is that not clear?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #12 on: January 26, 2010, 09:46:21 PM »
A mile is not there for the taking. They can't do anything but look. Is that not clear?

Charlie, I would agree with you, but I confess that I hide all the shares with write/read different from everyone/everyone.
that's because, as gtech said, for tidyness and to hide infos to the curious eyes :-)
my 2c

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #13 on: January 26, 2010, 10:18:16 PM »
Charlie, I would agree with you, but I confess that I hide all the shares with write/read different from everyone/everyone.
that's because, as gtech said, for tidyness and to hide infos to the curious eyes :-)

If the info is public (and publicly visible) I see no point in pretending to hide it from curious eyes. If you want to hide data, don't put it in the Primary i-bay (or in any publicly readable i-bay).

Offline gtech

  • **
  • 24
  • +0/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #14 on: January 28, 2010, 01:01:37 PM »
Charlie, I would agree with you, but I confess that I hide all the shares with write/read different from everyone/everyone.
that's because, as gtech said, for tidyness and to hide infos to the curious eyes :-)
my 2c


So Stefano....... How do you hide them.....sorry to be a pain, but simple how-to would be nice for the less "Cmd line" knowledgeable     :-(

Thanks

Graeme