Koozali.org: home of the SME Server

howto hide ibay fron network neighbourhood

jan reijsenbach

howto hide ibay fron network neighbourhood
« on: February 25, 2002, 10:48:53 PM »
Hello,

Can anyone tell me if it is possible to hide an ibay appearing in the network neighbourhood of a client-computer? To be more clear, I do want users to be able to acces it through a webbrowser but I do not want them too see it in the netneighbourhood and ' accidently' change stuff. If it is possible, how do I change it?

The reason I ask is that it seems php-projekt (http://www.e-smith.org/docs/howto/contrib/PHProjekt-howto.html) requires me to have an ibay that users can write to. Unfortunately Users also have full acces to the files that make up the php page. The Ibay is visible and accessible ... a potential problem.
I tried using a $ on the end of the Ibay name but e-smith doesn't allow this. Also it would be nice if the primairy ibay was hidden also.

If anyone has an idea on how to solve this please tell me.

regards,

Jan

Luke Drumm

Re: howto hide ibay fron network neighbourhood
« Reply #1 on: February 25, 2002, 11:47:08 PM »
Not that it solves you original question but...

Just a Thought:

The 'traditional' fix for this type of problem is to disable the direct file access completely and add file upload/download/manipulation ability to your CGI scripts.

Its can be a sizeable effort to do it but it makes it a lot easier to tie in file security with the same policies as your CGI stuff.

Regards,
Luke

Ulf Helmert

Re: howto hide ibay fron network neighbourhood
« Reply #2 on: February 26, 2002, 11:31:39 PM »
You may try the old NT trick to share the folder whith a $ at the end. I don't knof if its a OK name for a ibay but it's worth a try.

Regards,

Ulf

jan reijsenbach

Re: howto hide ibay fron network neighbourhood
« Reply #3 on: February 27, 2002, 04:25:37 AM »
Sorry, tried $ but e-smith doesn't allow this type of name. Maybe there is a way around this?  Any suggestions?

I think the CGI script idea is a promiseing one, as you mentioned though it is rather work intensive. Still hope to find a quick(er) fix. So if anyone has any additional ideas I'd appreciate reading about it.

Thanks both of you for your input.

Regards,

Jan

HJO

Re: howto hide ibay fron network neighbourhood
« Reply #4 on: February 27, 2002, 10:59:00 PM »
It is possible but the only way I know is a quick and dirty solution.

Edit your /etc/smb.conf and make insert a line for the iBay you like to hide with:
browseable = no
and save the file
then you have to restart the Sambaservice with the command:
service smb restart

The dirty way means that if something is changed through the service-manager on the samba-configuration the changes are lost.

Good luck
Hans

jan reijsenbach

Re: howto hide ibay fron network neighbourhood
« Reply #5 on: February 27, 2002, 11:41:32 PM »
Hans,

It works! But I don't know for how long. I think I should be doing something like this in de /etc/e-smith/custom-templates area but I am not sure what.

Do I need to:
1. copy the smb.conf to the /etc/e-smith/custom-templates/etc/
2. edit the copied smb.conf to include the line Hans (HJO) suggested (e.g.
    ' browseable = no' in the smb share discription of the iBay)
3. restart smb service

Is this all? Or am I missing something?

Regards,

Jan

Michael Herger

Re: howto hide ibay fron network neighbourhood
« Reply #6 on: February 28, 2002, 01:13:07 AM »
You only have to copy /etc/e-smith/templates/etc/smb.conf/90ibays to /etc/e-smith/templates-custom/etc/smb.conf/. Then edit it and add some line like:

if ($key =~ /yourIBay/) { $result .= "browseable = no\n"; }

_after_ the following line:

$result .= "[$key]\n";

Then run "/sbin/e-smith/expand-template /etc/smb.conf" (this will generate the new smb.conf) and restart smbd.

Note: I did not test this!

Regards, Michael

Devlyn Davis

Re: howto hide ibay fron network neighbourhood
« Reply #7 on: March 05, 2002, 04:21:57 AM »
Has anyone confirmed if the following works?  I'd like to disable browsing for the primary ibay and certain other ibays by default.  I'm going to try this myself but I wanted to check to see if anyone has already delved in.

Thanks,
-Devlyn

=======================================================
You only have to copy /etc/e-smith/templates/etc/smb.conf/90ibays to /etc/e-smith/templates-custom/etc/smb.conf/. Then edit it and add some line like:

if ($key =~ /yourIBay/) { $result .= "browseable = no\n"; }

_after_ the following line:

$result .= "[$key]\n";

Then run "/sbin/e-smith/expand-template /etc/smb.conf" (this will generate the new smb.conf) and restart smbd.

Note: I did not test this!
=========================================================

Michael

Re: howto hide ibay fron network neighbourhood
« Reply #8 on: March 05, 2002, 10:37:11 AM »
Yes, meanwhile I did test it and it worked for me.

Devlyn Davis

Re: howto hide ibay fron network neighbourhood
« Reply #9 on: March 05, 2002, 12:03:14 PM »
I'd also like to add that to hide the primary ibay from browsing, you need to copy /etc/e-smith/templates/etc/smb.conf/60primary to /etc/e-smith/templates-custom/etc/smb.conf

Then, edit that file by adding browseable = no in there and then run
/sbin/e-smith/expand-template /etc/smb.conf

Worked for me.  Thanks for the tips!

-Devlyn