How to Setup a Dedicated Home File Server Using Ubuntu Linux

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody its Frank here in this video I'm going to show you how to set up a dedicated home file server using ubuntu linux and samba this server will allow the whole family to store and share files and access them from Windows Mac or Linux computers this is actually a pretty easy thing to do but information out there on how to do it I found mostly to be either outdated no longer valid incomplete and confusing or simply wrong so I'm going to show you start to finish how to set up the server as well as how to access files from it did I mention the software is all free and it'll run on that outdated old computer you have lying around so let's get to it here's the scenario I want to set up a dedicated file server in my home that everyone in the family can connect to and store their files on with that said the server must meet the following three requirements one I want to use a really old computer I have laying around for the server meaning I don't want to spend any money on it at all other than a new hard drive for reliability - I want it to be a set it and forget it system that once configured would just sit and run for years and keep itself updated with no maintenance for me at all and three I want users to be able to access files from Linux Mac or Windows computers easily for my situation I want to have four shared folders one will be named my stuff and will be only accessible by me one will be named wife stuff and will be only accessible by her one will be named kid stuff for juniors use but files can also be viewed by the wife and finally one folder named everybody which will be accessible by all three of us and can be used for such things as videos pictures music and whatever in this folder I'll create subfolders for videos and music sound like fun good but before I can Samba I need to cobble together some old computer parts and get the server software installed so now I've got a computer put together with some old hardware that should work just fine you don't need anything with a lot of speed for this but it will need to have a 64 bit capable processor I recommend you purchase a new heart drive for your system for reliability this should be done whenever you build into the system based on the stated requirements my server will be Linux based in this case it'll be a minimal installed it will run very easily on my own system with only 512 Meg of RAM in my case I've downloaded Ubuntu Server version 14.04 LTS which you can get free from WWE boon to comm forward slash download forward slash server this is a long-term support version that will continue to get security updates and be supported until the year 2019 I recommend you stay away from using newer intermediate releases and only use long-term support versions barring hardware failure this thing should just sit and do its job for years without any assistance note in order for me to capture video on the server install and setup I'll be configuring it on a virtual machine the steps I'll be showing are identical to what I'll do on the physical machine so let's get to it I've already burned the ISO file to a disk and I'm ready to install it I just put it in the drive and start the system up during install it'll connect to the network using DHCP at the next screen when it asks for a hostname hit tab and select go back on that screen select configure the network manually the reason is that we want to have the server to have a statically assigned IP address that will always be reachable instead of one to sign by DHCP in my case I'm going to give it a host address of 192.168.0.0 followed by slash 24 which represents the subnet mask of 255 255 255 dot zero tab over to continue and hit enter if you don't know your network address go to a working computer and check the network settings that's using you'll be using the same first three numbers in the IP address these will almost always start with 192.168 but the third number may be different the last number can be anything below 254 as long as it's not being used by something else such as a network printer use a high number such as 250 or the next higher one if that's being used already once you pick one you should also go into your home router setup and exclude this address from being handed out by DHCP make sure your gateway address is correct you can also find this address from a working computer if you don't know it in my case I need to change it from one to five the name server address should be the same as your gateway address enter the host name I'll call mine server leave the domain name blank now you'll create a username and password that you will use to configure the server this should be something that only you will know unless you want somebody else to be able to also configure the server for my demo I just put in a wimpy four-letter password but this should really be at least eight characters long don't encrypt the home directory for the partitioning select guided use entire disk enter to select a disk to partition and tab over to yes to confirm just hit enter for proxy information and here is where you can set it to automatically install security updates which is just what I want arrow down to install updates automatically and hit enter for this one on this screen arrow down to Samba file server and hit the spacebar to select this option tab down to continue and make sure Samba is still selected before you hit enter this will install everything we need for the server to work just hit enter to install grub and remove the install DVD and hit enter to restart have to restart just login you can see here that it has some updates to install I'll get everything updated now you and restart everything keep in mind that this is the only update you'll need to do because I selected the install to automatically apply security updates as they're released it'll keep itself updated from now on no worries and log in again and now we can start configuring the server don't worry this will probably be a lot less typing than you think the first thing I'm going to do is create Linux accounts for the three users me wife and kid I'll need to enter my admin password to get into super user mode and enter my new password for the user me I just created just hit enter to accept all defaults for additional information and why to accept it all or just hit enter once again and add the other two users and now I need to do the same on samba this is required and the passwords will need to be the same as you've already entered to make this go faster just hit the up arrow after the first one is done and modify it for the next line done now I'm going to create the directories I'll be sharing and remember the case matters when you name things and now I'll assign permissions to the folders done not all that hard so far is it of course you can modify the folder names and users to suit your needs now that users passwords folders and permissions are all done it's time to modify the config file for Samba to tell it the folders to share and who can access them to do this I'll be modifying the existing SMB conf file you do that by entering sudo VI forward slash Etsy forward slash Samba forward slash SMB conf hit insert on the keyboard to get into edit mode and arrow down to here and verify that the workgroup shown is what you're using on windows by default Windows will use the name workgroup all in caps and this must match what it's using for network discovery to happen properly to verify this go to system and you can see the workgroup name here if you want to change it for some reason just click on change settings and click the Change button and rename it since I'm using the default that's already set there's nothing to do here if you're using something different just overwrite this name with the new one now scroll all the way to the very bottom of the file and enter the following be sure to use the square brackets here the folder name should change color if it's typed correctly if it doesn't arrow back and fix it for all the lines under this heading you need to enter a space before typing and remember the case matters in folder name once again if you type things incorrectly the text should change color this setting determines if the folder can be seen in network discovery for this folder and its subfolders I'll set it to yes for the private folders I'll set it to no next I'm going to say who can connect to this folder in this case it's all of us so I'll enter all three names and I'll do the same for both of the subfolders and now I'll set up the private folders that will not be browsable and remember that for this folder the wife also wanted access so that you can add and check homework files so I'll also give her access as well and that's all there is to this hit escape to get out of insert mode and type in colon W and Q to save the changes and quit by the way if you totally messed up and want to just exit without saving anything just hit : Q and the exclamation mark to quit without saving changes at this point one thing I recommend is to test the config file for errors to do this you can use the test parameters command like this and hit enter no errors are showing so all looks good now at this point you can simply restart the server and call the job finished and it should work I want to show you a quick optional thing you can do to improve security let me explain right now any of the users I've created will also be able to log in to the server if you're concerned about allowing a curious twelve-year-old access and only want to allow server access from your own private login you can modify the Etsy password file to prevent the new users from having direct login access to the server not a bad idea let me show you what I mean if I log off I can now log in with the kids username and password not good let me get back in with my private login to change this enter sudo VI forward slash Etsy /pa sswd and enter your admin password hit insert on the keyboard arrow down to the bottom view lines which should start with me wife and kid change the last word on each line from bin slash bash to bend slash false make absolutely sure you don't also do this to your private login or you're going to be hosed hit escape colon W and Q to write and quit and now I'll log off and now you can see they can't log in and do anything they'll just be kicked out but I can still get in with my private login now I'll restart the server and that's all there is to it when it restarts you don't need to login just leave it running by the way if you want it to shut down and stay off to move it for example just replace the dash R with dash H I've gone ahead and configured my physical server exactly as I just showed you now it's time to test everything and show you how to access files using different operating systems and users one thing you'll need to do in order to have windows bind the server is make sure network discovery is enabled if I open file explorer now with it turned off and click on network I get this message saying that it's turned off you can click here to change this directly or go to control panel click on view Network Status and tasks and then click on change advanced sharing settings click on the button to turn on network discovery and Save Changes it'll ask you for admin confirmation and done now if I go back and click on network again I can see it's found the server and I can see the everybody folders that were made browsable in the server config so let's see if I can access the private files on Windows 8 I'm logged in as kid and I can already see that it's showing the server and everybody folders but not my folder I'll copy a file into the everybody folder and also into the music folder easy to access the kid folder I'll need to map it right click on network and select map network drive and in here I'll put the server IP address and folder name use the backslashes as shown in the example make sure the reconnect at sign-in box is checked and click finish and there it is I'll copy my kid file into it and it's showing us a network location now I'll log out and login is me I can see the everybody folder and see the file the kid put in the music folder and open it I'll go ahead and right-click on the network and map my folder and copy a file to it and log out and now to test it on a Linux computer on this Linux machine I'm logged in with a username and password that's not on the server I'll show you how you can connect to the server as another user to do this I'll open computer click on file and connect to server in the server box enter one nine two one six eight zero dot one hundred change the type to Windows share I'll connect to the everybody folder now if I try to connect it'll ask me to verify my username and password since the server has no knowledge of my username note that it auto-populates workgroup in the domain name field to connect I'll change the user to me and enter that password tell it to always remember the password and I'm in while I'm here I'll open the videos folder and copy a video into it done by the way this process is basically the same when connecting using a Mac go to finder Network and it should show up in the network section use the connect as button to connect as a different user if needed now I'll try logging in on another Linux machine as wife and I'll connect to the wife stuff share I'll create a new file and edit it while it's on the server now if I go to network I can already see the everybody folder all I have to do is enter my password and tell the computer to remember it and I'm in I can see the cat video that I put in there previously and I want to see if the wife can also access the kids stuff folder so I'll connect to that no need to enter the password again for this and I'm in and I can open and modify the file that's already there now I'll log out and log into this machine as kid connect to the kids stuff share on this machine and if I open the file I can see the changes the wife made looks like everything is working just peachy so far for the final test I'll see if the wife can access things on her Windows computer just go to network and map the wife's stuff share and she can see the file she edited from the Linux machine she can also access the videos folder and watch the Kitty video I put there in the everybody / videos folder and that's it wife is happy so life is good so that's it for creating a home server using ubuntu server from start to finish I really hope you found this useful if you did please give this bid a thumbs up and subscribe if you haven't already this will help me out and until next time Cheers
Info
Channel: Frank's Helpdesk
Views: 235,803
Rating: undefined out of 5
Keywords: Home File Server, Linux File Server, Samba File Server, Ubuntu Server, Linux, Linux Server
Id: RDwoDj2cW6c
Channel Id: undefined
Length: 22min 18sec (1338 seconds)
Published: Mon Mar 07 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.