Hiding Samba home share - TIP

ghrasko
Posts: 24
Joined: Wed Nov 04, 2015 9:23 am

Hiding Samba home share - TIP

Postby ghrasko » Sun Nov 15, 2015 2:28 am

Fedora user home directories can't be managed from HDA web admin. If one would like to control them for example with Greyhole, the directory should be in the main share area in /var/hda/files. The standard home directories can't be easily added to a Greyhole share. If Amahi is used only via Samba and media streaming by the clients (users), the Samba home ought to be be disabled.

There are two topics already about these question, but they don't fully solve this problem:
Disable shared /home folders
hide /home shares

Commenting out the [home] sections from the /etc/samba/samba.conf configuration file manually would not work as Amahi will overwrite that file whenever you create or modify a share.

A feasible solution is to add a(n Amahi) share for each user. If you use the exact user name for the share directory (in /var/hda/files/<username>), this share will "shadow" the real user home directory from Samba clients. The share definition will be lower in the Samba configuration file. Samba (Windows etc.) users will only see the Amahi share.

Of course this is a good solution only if you would like to use home shares for users and you would like to use Amahi and it's modules (for example Greyhole) to control them. Once ceating these "Amahi home" shared directories in HDA web admin SHARES section, you should disable All users access for these directories. If you do so, HDA will list all users in the Access section and you will be able to revoke access rights for each user except the "home user" itself.

Environment tested:
  • Fedora 21
  • Amahi 8

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Hiding Samba home share - TIP

Postby bigfoot65 » Sun Nov 15, 2015 4:48 pm

Nice tip ghrasko.

Would you mind putting this in the Amahi Wiki. We prefer to use that as our sole source for tips and tutorials for the Amahi community.

It would be greatly appreciated.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: Google [Bot] and 9 guests