Computer Science

Linux Administration-Network Services and Funtionality

1         Linux Instructional Document

This document will reflect seven administrative tasks. Description along with screenshots will be added for the viewer’s understanding. Flavor of Linux named as Ubuntu 10.04 named as “Lucid Lynx” is used to perform the administrative tasks.

2         Task 1

2.1      Modification of the GRUB menu

For the modification of the GRUB menu, two files are used. The command which is executed to open the first file grub.cfg is “sudo gedit /boot/grub/grub.cfg”. After entering this command in the terminal window a popup screen will occur as shown in Figure 2.1.1 below

Figure 2.1.1

 Figure 2.1.2

The second file named ‘40_custom’ will be executed by the following command “sudo gedit /etc/grub.d/40_custom” in another terminal window as shown in figure 2.1.2

The highlighted commands will be copied to the 40_custom file as shown in the figure 2.1.3 and 2.1.4

Figure 2.1.3

The highlighted commands from figure 2.1.3 and 2.1.4 are coped to 40_custom file to make changes. Review figure 2.1.5 to get an idea below. Two operating systems are reflecting in this figure, Microsoft Windows XP professional and Ubuntu Linux. The titles of both the operating systems can be edited in this file. After making changes the ‘40_custom’file will be saved.

Figure 2.1.5

The default time out can be changed to 30 by modifying the values in the ‘grub.cfg’ file. It has been highlighted as shown in the Figure 2.1.6

Ubuntu does not have inittab file. Another alternative and easy method is implemented to change the default run level for Linux Ubuntu. The command executed for editing the file “/etc/init/rc-sysinit.conf”  and the default run level can be edited to ‘text only’ as shown in figure 2.1.7

Figure 2.1.7

2.2      Configuration of Dual Bootable system if necessary

Step 1: Open a terminal window in Linux by accessing “System,” >>> “Accessories,” >>> “Terminal.”

Step 2: Type the command “sudo grub” at the command prompt to start the Grub editing program.

Step 3: Specify Grub where the Ubuntu installation files are by entering the following command: “root (hdA,B)”. “hdA” A is the hard drive number and “B” is the partition where Ubuntu is installed. For example, Ubuntu installed in the second partition on the first hard drive, and then the command will be “root (hd0, 1)”.

Step 4: Grub loader will be reinstalled on the root drive by typing this command “setup (hdA)”, in which “hdA” is the drive in which Ubuntu is installed. It it is the first hard drive, the command will be “setup (hd0)”.

Step 5: Exit the Grub program by typing the command “quit” at the terminal window.

Step 6: Reboot system. When the system restarts, the Grub program will show the menu to choose between Ubuntu and Windows.

2.3      Run control level to text in the /etc/inittab file

Linux has certain run levels which defines the processes and services currently running on the system. There are different run levels in Linux retrieved from “” as:

Runlevel 1: Single user mode
Runlevel 2: Basic multi user mode without NFS
Runlevel 3: Full multi user mode (text based)
Runlevel 4: unused
Runlevel 5: Multi user mode with Graphical User Interface
Runlevel 6: Reboot System

For identifying the current run level the “who -command is executed as shown in figure 2.3.1


For changing the default run level, configuration needs to be done in the file called “rc-sysinit.conf”. The commands which are edited are highlighted as shown in figure 2.3.2

Figure 2.3.2

3         Task 2

3.1      Configuring Cron Job

“Cron tab” is a self-initializing daemon. It automated process defined by the user to execute later. For running the archiving command every ten minutes, following command is executed in the terminal: “rsync -rougv –archive –delete-excluded –ignore-errors –exclude=*.gvfs* /home/wjju /homeback.tar/”

The command “*/10 * * * * /path/to/command name” is executed in the “crontab” menu. Figure 2.1.1 shows the privileges for a newly created user who can access the backup directory.

4         Task 3

Four users are created with the passwords. Two new files are created in each of the user home directory. The users are Barney, Fred, Wilma and Betty as shown in Figure 3.1.1 and 3.1.2

Figure 3.1.1

 Figure 3.1.2           

Finance and Marketing groups are created. Fred and Barney are placed in the marketing group and Wilma and Betty are placed in the finance group.

  • Campaigns – marketing group has full access, all other users are denied access.
  • Financials – finance group has full access, all other users are denied access.
  • Public – finance group has full access, all other users have read-only access.

As shown in figure 3.1.3 below:

Figure 3.1.3

5         Task 4

5.1      Name Daemon

In Microsoft windows name daemon is called as DNS (Domain Name server). Linux operates on name daemon to map IP addresses. Ubuntu consists of BIND (Berekley Internet Naming Domain). For installing BIND following command is used in the terminal window “sudo apt-get install bind”. BIND stores all the configuration files in /etc/bind directory. The configuration file for BIND is located at /etc/bind/named.conf. The db.root file which is located at /etc/bind/db.root contains the root name servers of the world. To start the Name Daemon following command is executed in the terminal window:

“Sudo /etc/init.d/bind start”

6         Task 5

6.1      File Transfer Protocol

(Bautts, Dawson, and Purdy) For Linux Ubuntu file transfer protocol service named “vsftpd” is configured via the terminal window. Command used for configuring “vsftpd” is “sudo apt-get install vsftpd”. For accessing the vsftpd.conf file. User will type “/etc/vsftpd.conf” in the terminal window. To disable anonymous access, the “anonymous_enable” settings are edited to NO and the “local enable” settings are edited as YES. After making changes to the vsftpd.conf the FTP server is restarted by the following command in the terminal window”sudo /etc/init.d/vsftpd restart

7         Task 6

7.1      Linux Email Server

Linux Email server configuration is a challenging process. It contains the configuration of several processes associated with the Email server configuration. Each process is separately configured to ease the complex configuration.

7.1.1     MTA (Mail Transfer Agents)

MTA are agents used for sending and receiving email from the server. They play a key role in typical Email server settings. Ubuntu comprises of Postfix by default as a mail transfer agent. Exim 4 is also supported, having its presence to the main repository.

7.1.2     Delivery Agents

For download emails from a POP (Post office protocol) enables email accounts, POP and IMAP (Internet Message Access Protocol) needs to be configured on the Mail server.

7.1.3     Mail Filter

Every mail server must have features to support the security issues. User can filtration based on custom rules as per the requirement in order to detect viruses and spams.

7.1.4     Web Email Access

“Squirrel Mail” and “Open web email” services can be configured for accessing the web email feature in Linux.

8         Task 7

8.1      Web Server Configuration in Linux

Apache is a popular web server for Linux operations systems. Web server process the request coming from a web server and retrieves the requested web pages to the browsers. The apache web server does not come by default in Linux. A command is executed in the terminal window which is “sudo apt-get install apache2”. For checking whether the installation has been performed correctly, loopback IP address is entered in the Mozilla Firefox browser. If the apache web server is installed correctly, the message will retrieve “it works”

8.1.1     Web server Configuration

Domain Name configuration is performed in the “/etc/apache2” directory (Collings and Wall). There are two sub directories available in this directory. Sites available and sites enabled. The sub directory named sites available will be used as a template for configuring own site. The command for this will be “sudo cp default”

An administrative email address is defined here for contacting to the web master. reflects the following commands when opened by the file editor

#NameVirtualHost *

ServerAdmin [email protected]

Defines where the web site files are going to be located.

DocumentRoot /var/www/

<Directory />

Options FollowSymLinks

ServerName and ServerAlias directives need to be defined so that the web server knows which virtual host this configuration file refers to:

AllowOverride None




<Directory /var/www/>

Options Indexes FollowSymLinks MultiViews

AllowOverride None

Order allow,deny

allow from all

# This directive allows us to have apache2’s default start page

# in /apache2-default/, but still have / go to the right place

#RedirectMatch ^/$ /apache2-default/


After the configuration a copy of the /etc/apache2/sites-available/ configuration file is created by executing this command in the terminal window “/etc/apache2/sites-enabled” By creating a symbolic link from the file in sites-available it has been achieved:


“ln –s /etc/apache2/sites-available/”

8.1.2     Index File Creation

A directory is created for placing index.html file in it with the command:


The last step is to restart the Apache web server with the following command:

“Sudo /etc/init.d/apache2 restart”


Bautts, T., T. Dawson, and G. Purdy. Linux Network Administrator’s Guide. O’Reilly Media, 2005. Print.

“Computers: Linux Runlevels.” : Welcome to Web. 14 Sept. 2013. <>

Collings, T., and K. Wall. Red Hat Linux Networking and System Administration. Wiley, 2006. Print.