Dockstar-NAS: Automount, hd-idle, Samba, FTP

Dockstar-NAS: Automount, hd-idle, Samba, FTP

(4 votes, average: 5.00 out of 5)

Having debian installed on the dockstar is quite nice but how about access to the data in there? In this article I will explain how you easily set up a data-storage with autofs, hd-idle, samba and proftpd.
I assume you have debian squeeze running on a usb stick and your data you want to share on your network is stored on an external hard-drive.

1. autofs and hd-idle

In order to mount the hdd as it is connected to a certain mountpoint we will install autofs and to reduce its power-consumption we let it spin down after some minutes with hd-idle. The default repository doesn’t contain hd-idle so created a repo for the dockstar. You may want to add it to your /etc/apt/sources.list:

If you want to make sure, that this repository isn’t faked, you can add the gpg key to your apt-key:

Now install those packages:

1.1 autofs

I want to mount my external drives in /media so I added this line to /etc/auto.master:

This sets /media as the parent folder for all mounts in /etc/, so create and add the devices you want to mount. You can use sdxX or the uuid (find out with blkid) as the device:

Your hdd will be mounted as /media/disk1.

1.2 hd-idle

Spinning down all attached hdds: First of all enable hd-idle in /etc/default/hd-idle:

Thats it, just restart the service.

2. samba

You want to have windows-shares on your local network? I will explain how you set up password protected shares because I don’t want all of my friends in my WLAN have access to it 😉

Take a look at /etc/samba/smb.conf and customize it for your needs, these are those lines I have edited:

Once you have set this up you are ready to create the users, note they have to be unix users already:

If you now log in as user1 and run smbpasswd again you will update the samba and system password.
Finally restart samba and try the connection!

3. proftpd

Sometimes I have the problem not be at home when I need certain files stored on my dockstar. I either could connect to it with VPN or simply use FTP (note: insecure file-transfer). I chose proftpd because it’s easy to configure, install it by typing:

It will ask if you want to install it with inetd or standalone, choose standalone.
The default configuration fits pretty well for my needs, the only thing I enabled was VirtualRoot. As I login I am in jail in my home dir, the module gives me the ability to get out there. There you have to edit two files:

This makes every ftp-user able to access the ftp_share directory. For more security information check out

4. Reference