Hidden share creation
From NAS-2000.org
Contents |
[edit] Basics
If you point directly to your device using the Windows Explorer (through the Network Neighbourhood or by typing your ip address e.g.: "\\192.168.1.2") you can see all shares you created on your NAS.
But what is if you dont want that everybody on your network can see all these shares?
On Windows it is possible to create so called "hidden shares". This means that you can not see the shares in you Explorer. On Windows this is simply done by adding a $ sign at the end of the share name.
[edit] Problem
If you try this (adding a $ to the share-name) on your NAS you will receive an error message that the share name is invalid.
[edit] Solution
Create the share using the webinterface and assign the users wich should be allowed to access.
After you finished your configuration, log in to your nas by ssh and edit the smb.conf file directly.
vi /system/hddapp/etc/samba/smb.conf
Navigate to your share (the name is the one in []) and add the line
browseable=no
at the end of this part. After you have done this restart the samba server with:
/system/hddapp/etc/rc.d/S80samba.sh restart
[edit] Example
Lets say you want to create the hidden share "secret" and allow only the user secret to access this share.
- Create the user secret through the webinterface
- Create the share secret through the webinterface
- Assign write permission to the user secret on the share secret through the webinterface
- ssh to your NAS
- enter: vi /system/hddapp/etc/samba/smb.conf
- add the line "browseable=no" (without the quotes) to your share
- restart the samba server with the command: /system/hddapp/etc/rc.d/S80samba.sh restart
Here is an example how it should look (the bold line is the one you added):
[secret] use receivefile=yes create mask=0775 write list=secret path=/mnt/IDE1/secret directory mask=0775 writeable=no available=1 valid users=secret use sendfile=yes browseable=no