Home Server on a budget

There are solid reasons for having your own file server at home or home office and Microsoft has made a pitch for this market with their Home Server. I'm frequently called on to rebuild clients Windows computers that have become ruined by spyware and I don't want to transfer their infected, spyware ridden files on to my own Windows desktop. I need a DMZ where I can put these infected files while I rebuild the Windows computer. I use Linux and Samba. It is a reasonable way to make your own home server. If you're not familiar with Samba I recommend that you read more about it here at http://www.samba.org. Basically for the unfamiliar Samba is an open source implementation of SMB/CIFS and provides various file and print services for Windows clients. It can run on Linux, Unix, AIX, BSD and Apple's Mac OS X Server.

As you may already know Linux is not affected in the same way by viruses and other malware as Microsoft products. Therefore it makes a great candidate for a file server in your home. Better yet, because of TCP/IP and Samba it can be a file server for both your Windows machines and a Macintosh if you have one on your home network. Microsoft's Home Server costs about $130-$170 to purchase and both Linux and Samba are free. Configuring Samba for your own network can be easy if you know what you're doing. If you don't it can easily turn into a nightmare. You really don't need a very powerful computer for your home server. An old Pentium II or Pentium III will work, but a newer Pentium 4 would be great too. In such a small server an IDE drive can function quite well, but the newer SATA drives will definitely speed up your access. Memory is important by can be very modest by today's standards. Two-hundred-fifty-six megabytes might be enough for a smaller network. You don't even need a GUI to have Samba function properly.

Depending on the distribution of Linux you are running you will need to download and install Samba if it is not already running. If you want each user to have their own directory then you will need to setup users on the Linux Samba box. Those user names must mirror the Windows users. So if you have Joe on Windows you must have Joe on the Linux side of the equation too and Joe's password must be the same too.

A very simple Samba configuration file would look like this.

[global]

workgroup=workgroup

server string = %h server (Home Server)

security=share

[storage]

comment = Home Folder

path = /home/don/Documents

read only = No

guest ok = Yes

Remember you can change the workgroup to whatever your workgroup name is. Perhaps the best way to implement this is to backup your original Samba configuration file. Do this by logging into your Linux computer. If you're using Ubuntu as I am you would open a terminal windows and issue the following set of commands, "cd /etc/samba/." That set of commands will put you in the correct directory for the Samba configuration file. To satisfy your curiosity you might want to issue "pwd" for present working directory which would reveal "/etc/samba," or you might wish to list the directory to see the files. Do this by issuing the command "ls". Among the files you should see "smb.conf" which is the Samba configuration file. To protect yourself I would rename this so that you don't overwrite it. Since you are an unprivileged user you need to invoke sudo or in a Fedora or Red Hat system you would need to invoke "su -" with the little tac appended to the command so that you keep "root's" path statements. Whether using sudo or su - you will need to enter the root password. To rename "smb.conf" I issued this command, "sudo mv smb.conf smb_old.conf". The "mv"command in Linux allows you to rename files. To recreate a new "smb.conf" file issue this command, "sudo gedit smb.conf". This will open the Gnome editor and you can simply copy and paste my simple "smb.conf" noted above into gedit and then save the file. If you are not in GUI and only have a command line, then "sudo vim smb.conf" will work well. After the file is created and saved, test it by issuing "testparm" which should show you the configuration file. Start or restart Samba with the following command, "sudo /etc/init.d/samba restart", this will restart the samba daemon with the newly written file.

If you have gotten this far and decided to see your newly created resource in your "Network Neighborhood" you'll be disappointed that you still cannot write to it and that is because that you have not issued the necessary commands on the Linux side of the equation to allow that. You need to give those permissions to the guest user. In my case I need to issue the following command, "sudo chmod 777 /home/don/Documents or cd /home/don and then inside my home directory issue this command "sudo chmod 777 Documents." Once that is done you'll be able to go to any Windows computer on your network, browse to this Home Server and read and write files within that directory. This is a very simple illustration of the power of Samba. There are a number of great books written about Samba and I recommend you read them. Samba's own site is full of great documentation too. I've personally used Samba inside Active Directory, joined to it with Winbind, setup user profiles and had good success with it providing user home directories. It is very stable and very secure. My own very first Samba server ran on a Pentium II with 256 megabytes of RAM. As I mentioned earlier it's a great place to move files to should you need to rebuild a computer. Remember that any time you make a change to the "smb.conf" that you need to restart Samba with "etc/init.d/samba restart" to re-read the changed configuration. Remember also to keep your anti-virus up to date on your Window computers because Linux is not susceptible to viruses and malware, but Windows definitely is and it's easy to forget.

What’s wrong? The new clean desk test
Join the discussion
Be the first to comment on this article. Our Commenting Policies