HOWTO : Home made NAS server with Ubuntu 8.04.1 – Part II

Here comes the software installation. The first thing is to install the operating system – Ubuntu 8.04.1 Server Edition. The installation is quiet straight forward and you should choose LAMP, OpenSSH and Samba (Print server is optional) during the installation. Use a more complicate but easy to remember password as the user password and MySQL password. I use same password for them. Please write it down and you will need it later and forever.

Once installed, you can install vsFTPd and Fail2Ban. BitTorrent feature will be discuss later.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install vsftpd fail2ban

Samba
The Samba is already installed and you are required to configure it to make it work. I will make the Samba working in this way : Every user has it owned home directory and every user can access to a public directory for sharing document and files.

sudo nano /etc/samba/smb.conf

To add the following lines to the [global] section :
# If you need to access Big5 filename, it is required; otherwise it is optional.
dos charset = cp950

To add the following lines to the [global] section also :
hosts allow = 127.0.0.1 192.168.0.0/24 192.168.10.0/24
hosts deny = 0.0.0.0/0

At Authentication part, uncomment the “; security = user” to read as “security = user

Go to [homes] section and add the following lines to it :
[homes]
comment = Home Directories
path = /home/%S
browseable = yes
read only = no
create mask = 0664
directory mask = 0664
valid users = %S

Add the following lines to the end of the file :
[public]
comment = Share to all
path = /home/public
browseable = yes
read only = no
create mask = 0664
directory mask = 0664
valid users = samiux,john,mary
admin users = samiux

To reload the configuration of your Samba server :
sudo /etc/init.d/samba reload

where “admin users = samiux”may be different from you.

Then made a “public” directory at /home :
sudo mkdir /home/public
chgrp users /home/public
chmod 0777 -R /home/public

Now, create normal users as Samba users. Only the users exist in the server can use the Samba.

sudo adduser john
sudo adduser mary

You can access the Samba at Windows system in this way :

Go to your home directory :
\\192.168.0.15\samiux

Go to the public directory :
\\192.168.0.15\public

* your IP address may be different from me

Beware that all home user directories and public directory are writable. Users can add or delete files therein. The home directory owners cannot read and writable another home user directories.

By the way, you can also access the Samba file server on your Ubuntu desktop.

We will discuss how to configure vsFTPd in next part.

Advertisements

One Response

  1. […] Router (2) NAS – Part I (3) NAS – Part II (4) NAS – Part III (5) NAS – Part IV (6) NAS – Part IV(a) (7) NAS – Part V (8) NAS – Part VI (9) […]

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: