Browse this blog

Thursday, December 17, 2009

Linux - Share a complete hard disk with Samba on a Ubuntu Server

To share a whole hard disk with Samba is very easy:

1) Login as root:
sudo -s

2) We have to change the fstab-file, that the hard disk will be mounted right on boot:
nano /etc/fstab

You have to write the following in the fstab-file:
/dev/sdb /media/sdb auto umask=0000,rw,user,auto,exec 0 0  

In my case, we say that, "sdb" is the name of the harddisk.

3) Now we have to change the "smb.conf"-file:
nano /etc/samba/smb.conf

Write the following in the file:
comment = 20 GB Festplatte
path = /media/sdb/
read only = no
writeable = yes
create mask = 0766
directory mask = 0777
guest ok = yes
force user = *****
force group = users
4) Now we have to reboot the computer, that all changes will be accepted:

5) Finished! 

No comments:

Post a Comment