hide /home shares

gaia
Posts: 1
Joined: Thu Oct 22, 2009 1:59 pm

hide /home shares

Postby gaia » Thu Oct 22, 2009 2:01 pm

hey, i tried to edit the /etc/samba/smb.conf manually, but after every restart it "forgets" the settings. i guess that file is obviously generated by an hda script?

is there a way to turn home folder sharing off?

by the way, is it possible that amahi changes the workgroup automatically?? because my domain name is set to "amahi", then i activated advanced settings in the hda setup to modify the workgroup. the weird thing was that it was set to "home"...

thanks in advance :)

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: hide /home shares

Postby cpg » Thu Oct 22, 2009 3:41 pm

please do file a feature request for that (to not show the homes) in http://bugs.amahi.org
next time we're in that area we will tackle it.

with advanced settings on, the workgroup is changeable, under Shares -> Settings.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

abateman
Posts: 10
Joined: Thu Jan 21, 2010 2:17 am

Re: hide /home shares

Postby abateman » Sun Jan 24, 2010 5:08 pm

i tried to edit the /etc/samba/smb.conf manually, but after every restart it "forgets" the settings.
Not wanting to assume anything, you're editing the smb.conf file as root? I've made the mistake before where i edit a file like that as a non-root user (forget to sudo) and assume it has saved it when it hasn't..

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: hide /home shares

Postby cpg » Sun Jan 24, 2010 6:47 pm

they are forgotten because that file is not mean to be manually edited. it's automatically generated.

Code: Select all

# This file is automatically generated for WORKGROUP setup. # Any manual changes MAY BE OVERWRITTEN # Amahi configuration, generated on Fri Jan 22 15:00:13 -0800 2010
what we need to do is add custom settings to smb.conf for adcanced users.
someone needs to file a feature/bug and want it badly enough (or better yet! --> send a patch).
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

abateman
Posts: 10
Joined: Thu Jan 21, 2010 2:17 am

Re: hide /home shares

Postby abateman » Sun Jan 24, 2010 6:58 pm

they are forgotten because that file is not mean to be manually edited. it's automatically generated.
Odd.. it works for me. I guess I was a bit lazy and couldn't be bothered figuring out how to do it via the web interface so I changed smb.conf manually (removed the sharing of home files, adding of a couple other folders) and it works fine, even after several reboots.

(does that count as a bug then? ;-))

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: hide /home shares

Postby cpg » Sun Jan 24, 2010 7:05 pm

haha. you just have been lucky.

when you do ONE change to the shares area, it will get blown away.
so save it :)

or file a bug or send a patch to somehow add the custom settings from the web interface (or add an option to "freeze" the configuration?).
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

abateman
Posts: 10
Joined: Thu Jan 21, 2010 2:17 am

Re: hide /home shares

Postby abateman » Sun Jan 24, 2010 7:29 pm

AFAIK, samba itself only reads its config from /etc/samba/smb.conf, correct? This is as opposed to apache and php, etc. which read additional configuration files from /etc/httpd/conf.d and /etc/php.d respectively.

So without modifying samba somehow getting something similar to work would prove a bit tricky.

I'm all for having different aspects of the interface available for different levels of user (e.g. Beginner, Intermediate, Expert). Azuereus/Vuze does this to a certain extent with their BitTorrent client, but I think it's a good idea for anything where you've got a range of users with differing levels of interest and ability. Maybe an 'advanced' option could be the ability to edit config files and manage servers (DHCP, DNS) directly from the web interface, so still retaining some control over them.. but I digress..

I'm at work at the moment and unfortunately my home internet connection's playing up, otherwise I'd give it a go now. :)

jOOc
Posts: 19
Joined: Sun Jan 17, 2010 3:24 am
Location: Sweden

Re: hide /home shares

Postby jOOc » Mon Jan 25, 2010 12:26 pm

You can go around this by going to your hda and add new share.
Make sure you name it: homes
Then you click this new share and deselect "Visible", "All users" and also all permissions.

This new share will be at the bottom of the /etc/samba/smb.conf and will merge with the one higher up (you can see that with the command 'testparm').

I did some tests:
Before I added the new "homes" hare:

Code: Select all

# /usr/bin/smbclient \\\\hda\\luke -U luke Enter luke's password: Domain=[XXXXX] OS=[Unix] Server=[Samba 3.4.5-53.fc12] smb: \> ls . D 0 Sun Jan 24 16:26:45 2010 .. D 0 Fri Jan 22 22:18:02 2010 Public D 0 Fri Jan 15 22:54:20 2010 .mozilla DH 0 Fri Jan 15 22:56:22 2010 .netx DH 0 Wed Jan 20 17:45:04 2010 Pictures D 0 Fri Jan 15 22:54:20 2010 .qt DH 0 Mon Jan 18 17:58:32 2010 .adobe DH 0 Sun Jan 17 11:46:31 2010
And after:

Code: Select all

# /usr/bin/smbclient \\\\hda\\luke -U luke Enter luke's password: Domain=[XXXXX] OS=[Unix] Server=[Samba 3.4.5-53.fc12] tree connect failed: NT_STATUS_ACCESS_DENIED

Who is online

Users browsing this forum: No registered users and 31 guests