Protecting your system
Now that you have a working Ubuntu installation you will find that 1: you can access the Internet and 2: you can't see the other PCs in your LAN. We have to protect ourselves from the first condition and resolve the second!
Linux is much more secure than Windows. There are two basic reasons for this. First, the architecture of Linux is more security oriented than Windows, making it more difficult to attack, second, since there are relatively few Linux PCs out there (compared to Windows) the bad guys tend to target Windows for their attacks, and leave Linux alone.
Two simple and easy to use packages can be installed to provide you with a firewall and basic anti-virus protection. The firewall is called FIRESTARTER
, and the anti-virus is ClamAV
. Both of these packages can be installed from the Synaptic Package Manager which you can run from System - Administration - Synaptic Package Manager. Just start the package manager and use the search function to find and tick for install. Then click Apply and you're off!
In it's current release ClamAV needs to be run periodically against your disk. It does not automatically scan downloads etc. The best way to set this up is to use the automatic batch scheduler and a windows style .bat file called a script in Ubuntu. I'll show you how to do that at the end of this article.
Setting up your LAN
Setting up a LAN can be daunting in Linux, just like it can be in Windows. Before we actually can do it we need to perform two housekeeping tasks so that things will go smoothly for the rest of the process.
Note: If you are using a wireless connection and Ubuntu has not activated your connection, you probably have one of the wireless adapters for which there is no Linux driver. Not to worry, there is a package, called 'ndiswrapper', for this case. You need to get a working network connection (either wired or on another PC) and download and install the package. You also need to download the Windows drivers for the adapter from the manufacturers website. With the drivers unpacked on your PC, run 'ndiswrapper' (System - Administration - Windows) and point it to the .inf file in the driver directory. Ndiswrapper will allow Ububtu to use the Windows driver for the device.
Groups and Users
First, you need to create and join a group of users. Everybody who is going to share stuff should be members of the same group. To do this you need to use System - Administration - Users and Groups. Once open, you will need to unlock it to be able to update the entries. For that you will have to supply your password.
Once open you should go to Manage Groups and then click on Add Group. Create the group that you want to use and then add youself as a menber of the group.
File Sharing
In order to fully utilize file sharing on your LAN, so that each PC will be able to share folders and see the shared folders on the other PCs you need to be running software called SAMBA. You just need the Client piece to see others but you need the SERVER piece to let others see yours. The easiest way to get this software installed its to go ahead and tell the system to share a folder.
Open up the Places - Home Folder from the drop down menu. You will see Ubuntu's version of the Windows Explorer showing you all of the files and folders in your HOME folder. What I like to do is to make the Public folder you will see there really public. Just like Window's Shared Folders. To do that, right click on the Public folder.
At the bottom of the menu that opens up you will see Sharing Options. Click it and fill in the parts about sharing, then click OK (or whatever the oposite of Cancel is). At this point you will be informed that more software needs to be installed, namely, SAMBA. Let it go ahead and install. When it's done you should be brought back to the share window where you can again click the OK option. Now you're done!
Workgroup
If you've ever done this in Windows you'll remember that all the computers on the LAN were a member of a workgroup - probably all the same one if it's a home or small business LAN. It's the same for Ubuntu. The standard workgroup name is WORKGROUP! You can leave it at that if that is the name of your current workgroup. If it's not you have to change the name to whatever you will be planning to use.
To do this you need to edit a configuration file called smb.conf. You will find it in the /etc/samba/ folder. This folder belongs to the operating system and you need to have root privileges to edit it. The easiest way to do this is to use the Run Application function. Press Alt-F2. This will open up the function window. Type in the following sudo gedit /etc/samba/smb.conf and tick off the Run in Terminal box, then click Run. (To be on the safe side, you should make a copy of this file before you edit it. If you then screw it up you can always go back to the original file.)
Running this command will open up the gedit program which is a text editor. Right on the first page of the smb.conf file you will see the following:
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP
Change the WORKGROUP to whatever you want and you're set. All you have to do is restart SAMBA. The easiest way is to Log-out and Log-in again.
Samba GUI
There are a couple of tools to make Samba easier to use and allow you to see and configure your LAN from a GUI. You can install them using the Synaptic Manager. Do a search on 'Komba2' and 'system-config-samba'. Go ahead and install both and look them over. They can make configuring Samba a breeze.
Finally - Running Batch Programs
In Ubuntu as in Windows, sometimes you need to schedule things to happen at certain times on certain days. Windows had a scheduler, Linux has CRON. Since CRON is an integral part of Unbuntu you don't have to install anything to use it, but to make things simpler and to be able to use the GUI to set up schedules, I use Gnome Schedule. You can install it from the Synaptic Package Manager. Search for Gnome Schedule tick it off and install it.
Now you have the ability to cause batch executions of script filesĀ to occur at any time of the day, day of the week, etc. etc. (of course the PC has to be on and you have to logged in for it to work.) All you need to do now is to create the script file, which is quite simple.
Your scripts should all be put in the same location. I use a folder called bin in my home directory. To create it just open up Places - Home Folder. Right click in the folder area (or use File - Create Folder) and create a folder and name it 'bin'.
To use a very simple example let's create a file called 'firefox.sh'. Open it up with the text editor, put the following three lines into it, then save it:
#!/bin/bash
firefox
exit
To be able to run the script you have to tell Ubuntu that it is OK to execute it. To do this, right click on the file and open the Preferences window. Clicking on the Permissions tab, at the bottom you will see a box to tick that says "Allow executing file as program". Tick that off and close the Preferences window. (Now if you double click on the file Ubuntu will ask if you want to run the file or display it - it is now officially an executable script.
Now, to get CRON to run our script file we need to open the scheduler. Use System - Preferences - Scheduled Tasks. Click on the add button and you will be presented with a window to fill in with the details of the schedule for running your task. You need to fill in the command box with the command that you want CRON to execute. For our case, the command will be: /home/your-login/bin/firefox.sh.
That's all there is to it. Ubuntu will now run Firefox at whatever days and times you put in the schedule!





