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

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #15 on: January 28, 2010, 01:20:23 PM »

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

Graeme, please re-read your first post in this topic :-)

or, better, read here, thank you

Offline gtech

  • **
  • 24
  • +0/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #16 on: January 28, 2010, 02:40:10 PM »
Thanks Stefano,

Gave it a try and it did'nt do anything for me, so a bit of thinking and I ended up using WinScp to find the SMB.CONF file, made a backup, then proceeded to alter the relevant part to hide the Primary folder.

All worked..... Now I know its only a minor thing, but to me its now made things tidier and I'm happy.....Sad I know  :-)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: HOWTO: Hide Primary i-bay!
« Reply #17 on: January 28, 2010, 03:38:30 PM »
Gave it a try and it did'nt do anything for me, so a bit of thinking and I ended up using WinScp to find the SMB.CONF file, made a backup, then proceeded to alter the relevant part to hide the Primary folder.

All worked..... Now I know its only a minor thing, but to me its now made things tidier and I'm happy.....Sad I know  :-)
But this change will not survive configuration changes or upgrades. Please take some time to read how to make changes to configuration files by modifying configuration templates that build the actual configuration. It is outlined in short in the wiki: http://wiki.contribs.org/Template_Tutorial or for more details the SME Server Developers Guide also linked from that page.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline gtech

  • **
  • 24
  • +0/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #18 on: January 28, 2010, 04:15:15 PM »
Thanks Cactus,

I was after a quick fix initially just to get this up and running, now I have, and with the info Stefano and yourself (and others) have given, I have now got the time to sit down and take all this in.

I'm afraid years of working on Windows (yuk!!) has made the mind lazy........I should of been with Linux years ago, I would'nt be in this position now.

Thanks for the link, and I promise I will take all this on board and try the template method.

Many thanks

Graeme

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: HOWTO: Hide Primary i-bay!
« Reply #19 on: January 28, 2010, 04:20:19 PM »
I was after a quick fix initially just to get this up and running, now I have, and with the info Stefano and yourself (and others) have given, I have now got the time to sit down and take all this in.
Fair enough.

Thanks for the link, and I promise I will take all this on board and try the template method.
It won't bother me if you do not, but it might already explain any occurrence of Primary being visible in the future. This way you know how to fix it properly instead of hacking every time.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline jonic

  • *
  • 103
  • +1/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #20 on: February 03, 2010, 12:11:20 AM »
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?

As others have said tidiness mainly. I mean what is the purpose of a share visible to everyone in the network, if only the admin user can browse it? And I got a lot of questions from users about it - what's in it?, why is it there?, why can't they access it?   :)




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

This has been integrated in standard SME (I think around 7.3). So all you have to do is:

Code: [Select]
db accounts setprop Primary Browseable disabled
signal-event ibay-modify

(this works for every ibay)

Offline dexterh

  • *
  • 7
  • +0/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #21 on: December 02, 2010, 05:41:39 PM »
I'm not looking for a reply as this is an old post.

I've used this method to hide the Primary i-bay on a server I'm using as a domain controller with the "Shares" mod. to keep the questions down about "What is this?"

Recently, I've had a problem with my network neighborhood not being browsable.  I checked to see what the OsLevel was set at using the following:

testparm | grep 'os level'

I got the following for the primary:

Processing section "[Primary]"
ERROR: Badly formed boolean in configuration file: "disabled".

I changed the "disabled" to "no" using the following:

db accounts setprop Primary Browseable no
signal-event ibay-modify

and the error went away.  This seemed the most suitable place to make the comment.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #22 on: December 02, 2010, 05:50:48 PM »
and the error went away.  This seemed the most suitable place to make the comment.

thank you, but you should open a bug in bugzilla for it

thank you in advance

Offline purvis

  • *****
  • 567
  • +0/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #23 on: December 03, 2010, 06:56:57 PM »
I turn off the computer browser service on all my windows computers and also change my sme workgroup name to something other than a workstation has.

I though computer browsing was being removed by Microsoft's newer oses.
If the users are not computer ilterate. Do not let them browse period

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #24 on: December 03, 2010, 08:23:07 PM »
I turn off the computer browser service on all my windows computers and also change my sme workgroup name to something other than a workstation has.

I though computer browsing was being removed by Microsoft's newer oses.
If the users are not computer ilterate. Do not let them browse period

this won't work if you need to join pc's to domain and, generally speaking, it's, IMHO, a bad idea

my 2c

Offline purvis

  • *****
  • 567
  • +0/-0
Re: HOWTO: Hide Primary i-bay!
« Reply #25 on: December 04, 2010, 02:08:08 AM »
When applying any security procedure. The are always good and bad effects.