Hi I just tried SliTAz, and I like it very much, it is so fast and smooth on my thin client (a Siemens Futro S400, with only 500 MB cf-card as HDD).
First I would say that my Linux skills are limited (I have installed Debian Squeeze on a Dockstar - but thats all)
I would like to use this thin client as a NAS, using SliTaz as the OS. But I have some problems.
1. Is it possible to auto mount an extern USB HDD, so when you plug it into the USB slot it is recognized and mounted?
2. Is it also possible to auto share this extern HDD via Samba.
I found some scripts for debian that should do the trick, but will it work in SliTaz as well:
It is from here: http://dev.shyd.de/2011/01/dockstar-nas-automount-hd-idle-samba-ftp/
consumption we let it spin down after some minutes with hd-idle. The default repository doesn't contain hd-idle so dev-eth0.de created a repo for the dockstar. You may want to add it to your /etc/apt/sources.list:
1
deb http://repo.dev-eth0.de/ squeeze main
If you want to make sure, that this repository isn't faked, you can add the gpg key to your apt-key:
1
wget http://repo.dev-eth0.de/repo.key
2
apt-key add repo.key
Now install those packages:
1
apt-get update
2
apt-get install autofs hd-idle
1.1 autofs
I want to mount my external drives in /media so I added this line to /etc/auto.master:
1
/media /etc/auto.media --timeout=10 --ghost
This sets /media as the parent folder for all mounts in /etc/auto.media, so create auto.media and add the devices you want to mount. You can use sdxX or the uuid (find out with blkid) as the device:
1
disk1 -fstype=ext3,users UUID="ddf4386d-a9cb-4b98-9d6f-46e90190xxxx"
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:
1
# start hd-idle automatically?
2
START_HD_IDLE=true
3
# spin down after 300 sec and write logfile
4
HD_IDLE_OPTS="-i 300 -l /var/log/hd-idle.log"
Thats it, just restart the service.
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
1
apt-get install samba samba-common samba-common-bin
Take a look at /etc/samba/smb.conf and customize it for your needs, these are those lines I have edited:
01
# some global vars I edited:
02
[global]
03
workgroup = FAMILIE
04
wins support = yes
05
security = user
06
unix password sync = yes
07
08
# my shares:
09
[homes]
10
comment = Home Directories
11
browseable = no
12
read only = no
13
writeable = yes
14
create mask = 0700
15
directory mask = 0700
16
valid users = %S
17
18
[printers]
19
comment = All Printers
20
browseable = yes
21
path = /var/spool/samba
22
printable = yes
23
guest ok = no
24
read only = yes
25
create mask = 0700
26
27
[media]
28
comment = all mounted hdds
29
path = /media
30
browseable = yes
31
;veto files = /ftp_share/ #to hide dirs
32
#to hide dirs another way, try which fits for you
33
hide files = /desktop.ini/Desktop.ini/DESKTOP.INI/$RECYCLE.BIN/Thumbs.db/thumbs.db/THUMBS.DB/
34
writeable = yes
35
create mask = 0777
36
directory mask = 0777
Once you have set this up you are ready to create the users, note they have to be unix users already:
1
smbpasswd -a user1 # add user
2
smbpasswd -e user1 # enable user
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!