NSLU2-Linux
view · edit · print · history

HowTo.CreateHiddenShares History

Hide minor edits - Show changes to markup

July 16, 2007, at 08:25 PM by pedxing --
Changed lines 78-83 from:

I simply added a section for an existing share like this:

 [ADMIN 2]
 browsable = no

This will survive a reboot.

to:

I simply added a section for an existing share containing "browsable=no". Copy the entire content of each share's section in /etc/samba/smb/conf into /etc/samba/user_smb.conf and add "browsable=no" to the end. This will survive a reboot!

July 16, 2007, at 08:11 PM by pedxing --
Added lines 75-76:

Hiding the ADMIN and DISK shares

Deleted lines 83-84:

---

May 20, 2007, at 04:53 PM by slyhne --
Added line 72:
Added lines 74-83:

The easiest way I have found was to create/edit the file /etc/samba/user_smb.conf I simply added a section for an existing share like this:

 [ADMIN 2]
 browsable = no

This will survive a reboot.

---

October 24, 2006, at 07:52 PM by spankywetfish -- Another edit method...
Changed lines 68-72 from:

Sorry 4 bad english!

to:

Sorry 4 bad english!


One other way of making these changes and it surviving a reboot (share.info definately, not tried smb.conf) is to download the and edit the config file. Backup the config using the web GUI as normal. Open the config.bin which you have just saved using a compression utility (I used 7-Zip, it definately works), then navigate through the directory structure until you find the file you want to edit. Edit and upload back to your slug. It will reboot and your changes will have taken effect. I have successfuly used this process to edit share.info and CGI_ds.conf


May 02, 2006, at 08:39 AM by jaku --
Changed line 66 from:

No, they won't survive a reboot! But you ca edit the smb.conf at start up with a Diversion-Script (see DiversionScriptInformation?) and the command sed!

to:

No, they won't survive a reboot! But you ca edit the smb.conf at start up with a Diversion-Script (see Diversion Script Information) and the command sed!

May 02, 2006, at 08:39 AM by jaku --
Changed line 66 from:

No, they won't surwive a reboot! But you ca edit the smb.conf at start up with a Diversion-Script (see DiversionScriptInformation?) and the command sed!

to:

No, they won't survive a reboot! But you ca edit the smb.conf at start up with a Diversion-Script (see DiversionScriptInformation?) and the command sed!

May 02, 2006, at 08:38 AM by jaku --
Changed lines 64-68 from:

Chris Kantarjiev asks: Will the changes to /etc/samba/smb.conf survive a reboot? It seems that it is rebuilt during the boot process from files that are stashed in /share/hdd/conf/samba (or somewhere down there - there are many copies of smb.conf on an unslung slug...)

to:

Chris Kantarjiev asks: Will the changes to /etc/samba/smb.conf survive a reboot? It seems that it is rebuilt during the boot process from files that are stashed in /share/hdd/conf/samba (or somewhere down there - there are many copies of smb.conf on an unslung slug...)


No, they won't surwive a reboot! But you ca edit the smb.conf at start up with a Diversion-Script (see DiversionScriptInformation?) and the command sed! (eg sed -i -e '/\[ADMIN\]/abrowsable=no' /etc/samba/smb.conf) Sorry 4 bad english!

January 27, 2006, at 02:47 PM by Chris Kantarjiev -- I think this is the wrong smb.conf
Added lines 63-64:

Chris Kantarjiev asks: Will the changes to /etc/samba/smb.conf survive a reboot? It seems that it is rebuilt during the boot process from files that are stashed in /share/hdd/conf/samba (or somewhere down there - there are many copies of smb.conf on an unslung slug...)

October 26, 2005, at 07:19 AM by Mrhertog -- typo
Changed line 41 from:

Open the file smb.conf withe the following command:

to:

Open the file smb.conf with the the following command:

October 26, 2005, at 07:18 AM by Mrhertog -- Another way to hide shares by editing smb.conf
Changed lines 35-62 from:

as a "1" is added to the end these two when shared upon (re)starting samba.

to:

as a "1" is added to the end these two when shared upon (re)starting samba.

Another way to hide shares in Network Neighbourhoodis to edit the file smb.conf, this way you can also hide the shares: ADMIN and DISK

For this you need Telnet access to the nslu2.

Open the file smb.conf withe the following command: vi /etc/samba/smb.conf

Find the following:

[ADMIN 1] valid users=@"administrators" comment= path=/share/hdd/data/ read only=yes write list=@"administrators"

Add the following line:

browsable = no

you can do the same with other shares you do not wish to see anymore. After this restart the samba service. You can still see these shares with the webinterface.

June 20, 2005, at 04:32 PM by tman --
Changed lines 7-25 from:

1) Create a share in the normal way using the Web interface (Administration -> Advanced -> Shares). A share may also have been created as part of adding a new user from the Adminstation -> Users web page.

2) telnet / ssh to your NSLU2.

3) vi /share/hdd/conf/share.info [or use your favourate text editor]

4) Search for the line you wish to edit and add a $ at the end of the share name.

For example, before editing:

  ADMIN=:/:administrators:7
  DISK=For everyone:/public/:administrators:7
  hidden=My hidden area:/hidden/:administrators:7

After editing:

  ADMIN=:/:administrators:7
  DISK=For everyone:/public/:administrators:7
  hidden$=My hidden area:/hidden/:administrators:7

5) Save the file and run the following command to force Samba to reload the shares:

to:
  1. Create a share in the normal way using the Web interface (Administration -> Advanced -> Shares). A share may also have been created as part of adding a new user from the Administration -> Users web page.
  2. telnet / ssh to your NSLU2.
  3. vi /share/hdd/conf/share.info [or use your favourate text editor]
  4. Search for the line you wish to edit and add a $ at the end of the share name.

    For example, before editing:
    ADMIN=:/:administrators:7
    DISK=For everyone:/public/:administrators:7
    hidden=My hidden area:/hidden/:administrators:7

    After editing:
    ADMIN=:/:administrators:7
    DISK=For everyone:/public/:administrators:7
    hidden$=My hidden area:/hidden/:administrators:7
  5. Save the file and run the following command to force Samba to reload the shares:
    \\
Changed lines 29-33 from:

6) Browse your NSLU2 using Windows Explorer. You should not be able to view the share you created, and to access it remember to use the $ post-fix (e.g. in my example, \\NSLU2\hidden$ to get access)

7) You will still be able to change the security of the share using the NSLU2 web interface.

to:
  1. Browse your NSLU2 using Windows Explorer. You should not be able to view the share you created, and to access it remember to use the $ post-fix (e.g. in my example, \\NSLU2\hidden$ to get access)
  2. You will still be able to change the security of the share using the NSLU2 web interface.
March 23, 2005, at 07:10 PM by chi-zphpguicom --
Changed lines 30-35 from:

7) You will still be able to change the security of the share using the NSLU2 web interface.

to:

7) You will still be able to change the security of the share using the NSLU2 web interface.

**NOTE** This will not work when trying to hide ADMIN or DISK, as a "1" is added to the end these two when shared upon (re)starting samba.

January 24, 2005, at 01:07 PM by uSURPER --
Changed line 9 from:

2) telnet to your NSLU2.

to:

2) telnet / ssh to your NSLU2.

Changed lines 25-26 from:

5) Save your file and reboot your NSLU2.

to:

5) Save the file and run the following command to force Samba to reload the shares:

  /etc/rc.d/rc.reset_usrgrpshare
January 24, 2005, at 11:22 AM by Lennart --
Changed line 11 from:

3) vi /shared/hdd/conf/share.info [or use your favourate text editor]

to:

3) vi /share/hdd/conf/share.info [or use your favourate text editor]

January 13, 2005, at 10:13 PM by uSURPER --
Changed lines 1-29 from:

Describe CreateHiddenShares here.

to:

The NSLU2 supports the creation of hidden shares. This means that the share you create won't be visible from Network Neighbourhood but will exist and can be accessed.

Hidden shares are not truly hidden so do not rely on them as your only source of securing your environment. It is trivially easy via a Linux box to use smbclient to enumerate the hidden shares. For most home Windows environments this will be fine.

The process to create a hidden share is this:

1) Create a share in the normal way using the Web interface (Administration -> Advanced -> Shares). A share may also have been created as part of adding a new user from the Adminstation -> Users web page.

2) telnet to your NSLU2.

3) vi /shared/hdd/conf/share.info [or use your favourate text editor]

4) Search for the line you wish to edit and add a $ at the end of the share name.

For example, before editing:

  ADMIN=:/:administrators:7
  DISK=For everyone:/public/:administrators:7
  hidden=My hidden area:/hidden/:administrators:7

After editing:

  ADMIN=:/:administrators:7
  DISK=For everyone:/public/:administrators:7
  hidden$=My hidden area:/hidden/:administrators:7

5) Save your file and reboot your NSLU2.

6) Browse your NSLU2 using Windows Explorer. You should not be able to view the share you created, and to access it remember to use the $ post-fix (e.g. in my example, \\NSLU2\hidden$ to get access)

7) You will still be able to change the security of the share using the NSLU2 web interface.

view · edit · print · history · Last edited by pedxing.
Based on work by pedxing, slyhne, spankywetfish, jaku, Chris Kantarjiev, Mrhertog, tman, chi-zphpguicom, uSURPER, and Lennart.
Originally by uSURPER.
Page last modified on July 16, 2007, at 08:25 PM