Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: dhani on March 07, 2007, 08:29:21 PM

Title: HOWTO: Hide Primary i-bay!
Post by: dhani 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
Title: HOWTO: Hide Primary i-bay!
Post by: jonic 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
Title: HOWTO: Hide Primary i-bay!
Post by: Stefano 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
Title: HOWTO: Hide Primary i-bay!
Post by: byte on March 09, 2007, 10:42:52 AM
Has anyone raised a New Feature Request (NFR) this may be of interest.
Title: HOWTO: Hide Primary i-bay!
Post by: dhani 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?!
Title: HOWTO: Hide Primary i-bay!
Post by: bpivk on March 09, 2007, 12:45:56 PM
In the bugtracker.
Title: Re: HOWTO: Hide Primary i-bay!
Post by: gtech 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
Title: Re: HOWTO: Hide Primary i-bay!
Post by: CharlieBrady 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?
Title: Re: HOWTO: Hide Primary i-bay!
Post by: gtech 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
Title: Re: HOWTO: Hide Primary i-bay!
Post by: CharlieBrady 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?
Title: Re: HOWTO: Hide Primary i-bay!
Post by: gtech 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
Title: Re: HOWTO: Hide Primary i-bay!
Post by: CharlieBrady 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?
Title: Re: HOWTO: Hide Primary i-bay!
Post by: Stefano 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
Title: Re: HOWTO: Hide Primary i-bay!
Post by: CharlieBrady 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).
Title: Re: HOWTO: Hide Primary i-bay!
Post by: gtech 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
Title: Re: HOWTO: Hide Primary i-bay!
Post by: Stefano 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 (http://wiki.contribs.org/DB_Variables_Configuration#Samba_per_i-bay_settings_.28smbd.29), thank you
Title: Re: HOWTO: Hide Primary i-bay!
Post by: gtech 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  :-)
Title: Re: HOWTO: Hide Primary i-bay!
Post by: cactus 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.
Title: Re: HOWTO: Hide Primary i-bay!
Post by: gtech 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
Title: Re: HOWTO: Hide Primary i-bay!
Post by: cactus 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.
Title: Re: HOWTO: Hide Primary i-bay!
Post by: jonic 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)
Title: Re: HOWTO: Hide Primary i-bay!
Post by: dexterh 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.
Title: Re: HOWTO: Hide Primary i-bay!
Post by: Stefano 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
Title: Re: HOWTO: Hide Primary i-bay!
Post by: purvis 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
Title: Re: HOWTO: Hide Primary i-bay!
Post by: Stefano 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
Title: Re: HOWTO: Hide Primary i-bay!
Post by: purvis on December 04, 2010, 02:08:08 AM
When applying any security procedure. The are always good and bad effects.