How to turn an old netbook into a NAS drive

3. Install Samba

Before augmenting your NAS with any other features, it's important to get the basic functionality right. To share files on your netbook USB drive with all the other machines in your network, you need to install a server called Samba.

This is the open-source implementation of Microsoft's network protocol, which means that it will work with all of the Windows, OS X and Linux machines on your LAN. It's the most common fileserver system and it's used by many NAS devices.

Step 3

UNR doesn't waste netbook space installing Samba by default, so you need to install it manually. As with the desktop version of Ubuntu, this is best done through the Synaptic package manager, which can be found in the Administration section of the System group of applications. Just search for samba and install the resulting package.

After the package has installed, switch back to the file manager view for your USB storage device. Create the directory you want to be shared across your network and rightclick on the folder. You should now see 'Sharing Options' listed in the menu that appears. When you select this, a window will open.

From that window, enable the 'Share this folder' and 'Guest Access' options. The latter could be a security risk, as it means anyone with access to your LAN will be able to read the files on your NAS. This is fine if you trust your network, but unacceptable if your network is shared. In those cases, leave 'Guest access' disabled and make sure that each machine you want to share the folder with has a user account and password that has an identical name and password to an existing account on your netbook.

You might also want to tick the 'Allow others to create and delete files in this folder' box, unless you want your file sharing to be read-only.

When you've finished with the options, click on 'Create share' and 'Add the permissions automatically' in the window that pops up. You should see that the folder icon for your share now has two arrows across it to indicate that the folder is being shared across your LAN.

4. Access your files

You can now access your files from other computers on your LAN, and your NAS box should appear within their network folders.

If you need to specify an address, such as from OS X's 'Go | Connect to a Server' menu or Gnome's equivalent 'Go | Location' menu option, then type smb://ubuntu into the location field. This is the default hostname for our new installation, and 'smb' is requesting access through the Samba protocol.

Step 4

After a few seconds, you'll see the folder you just created appear, and you'll be able to access files and folders within that directory as if they were local. Congratulations, your netbook is now a NAS device!

5. Add online backup

To bring your NAS in line with more functional boxes, it's time to add some packages. Backup is at the top of our list, and UNR has a feature called Ubuntu One that's perfect for this job.

This service automatically copies your local files to a remote server. You can then download them from the server to any Ubuntu machine with an Ubuntu One account.

Step 5

Configuration is easy: just look for the Ubuntu One logo in the Internet category, click on it and either enter your account information or create a new account. You'll then be asked to verify your computer's name and say that you'd like the data to be synced. A free account can store up to 2GB of data, but you can subscribe to the commercial service if you want to store more.

Switch to the file manager and you should see a new Ubuntu One folder. Anything you place here will be synchronised with the Ubuntu One server. Rightclick on it to enable it as a shared folder.

6. Security and remote access

There are many security issues surrounding opening your NAS box up to the internet, but UNR should be up to the task as long as you keep your system up to date and install any patches. You should receive automatic update alerts, but this can be a problem when using your netbook as a NAS if you end up not looking at the screen very often.

The easiest solution is to enable a mode where updates are applied automatically. Find and click on the Software Sources icon and in the window that appears switch to the Updates tab. This page manages the background update tasks, and you need to tick the 'Install security updates without confirmation' box and change the update frequency to one your connection can handle. 'Daily' is fine for most installations.

If you want internet access to your box, the safest way is to use SSH (the secure shell). This provides command-line access to your NAS box using a tool such as Putty on Windows machines, or the 'ssh' command in Linux. You'll need to install the opensshserver package on your box.

To connect, forward TCP port 22 to your NAS box through your router and log in with your standard account details. If you prefer a graphical desktop, install the tightvncserver package on your NAS and type tightvncserver:1 into the command line to create a new session.

Any VNC client on your LAN can now access a desktop on the NAS using the address 'ubuntu:1'. To access your desktop from the internet, use SSH to pipe the VNC port through the SSH connection with ssh -L 5901:localhost:5901 ubuntu. address and use a local VNC client to access localhost:5901.

7. Add more functionality

The best reason for using UNR on a netbook to create a NAS is that you can augment your installation with all kinds of functionality, from web servers to media players.

One of the most popular is MediaTomb, a UPnP-compatible media streamer and transcoding tool that's easy to install and configure.

Install it by opening the Synaptic package manager on your netbook and searching for mediatomb. There will be several dependencies.

After installation has completed, switch to the Sound and Video application launcher window and you'll find a new MediaTomb icon. Double-click this and Firefox will launch, loading the MediaTomb web-configuration panel.

From MediaTomb's web page, you can navigate to your media files on your storage device. Click on the '+' symbol on the right to add them to the MediaTomb library.

MediaTomb supports all the most common media formats. After a few moments, you'll be able to view or listen to your content on any UPnP-compatible client such as Windows Media Player, RhythmBox, a PlayStation 3 or an Xbox 360.

To run a web server from your NAS box, install the apache2 package, then type http://localhost into Firefox to see a web page that declares 'It works!'.