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
-
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
{
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
-
Good tip! I was looking for something like this myself.
But I think the code should be:
{
if ($key eq 'Primary')
{
$OUT .= "browseable = no\n";
}
}
Without the "\n" part I get in smb.conf:
browseable = noreadonly = no
-
Good tip! I was looking for something like this myself.
But I think the code should be:
{
if ($key eq 'Primary')
{
$OUT .= "browseable = no\n";
}
}
Without the "\n" part I get in smb.conf:
browseable = noreadonly = no
well.. I think we can have more..
mkdir /etc/e-smith/templates-custom/etc/smb.conf/ibays
pico 20browseable
{
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
-
Has anyone raised a New Feature Request (NFR) this may be of interest.
-
I myself certainly vote for this options on ibay prop default...
where could i propose for the new feature request?!
-
In the bugtracker.
-
well.. I think we can have more..
mkdir /etc/e-smith/templates-custom/etc/smb.conf/ibays
pico 20browseable
{
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
-
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?
-
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
-
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?
-
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
-
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?
-
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
-
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).
-
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
-
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
-
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 :-)
-
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.
-
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
-
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.
-
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:
db accounts setprop Primary Browseable disabled
signal-event ibay-modify
(this works for every ibay)
-
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.
-
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
-
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
-
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
-
When applying any security procedure. The are always good and bad effects.