Sunteți pe pagina 1din 52

Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.

Global Open Versity


IT System Integration Hands-on Labs Training Manual

Install Guide Ubuntu 10.04 LTS Server


Kefa Rabah
Global Open Versity, Vancouver Canada
krabah@globalopenversity.org
www.globalopenversity.org

Table of Contents Page No.

INSTALL GUIDE UBUNTU 10.04 LTS SERVER 1

1.0 Introduction 1

Part 1: Install & Configure Ubuntu 10.04 LTS Server 2


Step 1: Getting Started & Hardware Pre-requisites 2
Step 2: Install Linux Ubuntu 10.04 LTS 2
Step 3: Update Ubuntu 10.04 Operating Systems 19

Part 2: Install Optional Additional Packages 20


Step 1: Install Desktop Environment 20
Step 2: Install Webmin 21

Part 3: Perform Additional Optional Tasks 23


Step 1: Configure Network Interface 23
Step 2: Change system hostname 25

Part 4: Install DNS Server 25


Step 1: Install & Configure Bind9 25

Part 5: Postfix Mail Server 28


Step 1: Verify that DNS is working correctly 28
Step 2: Install Postfix Mail 29
Step 3: Configure Postfix 29
Step 4: Test Postfix default setup 33
Step 5: Setup Mailbox 34

Part 6: Allowing Remote Access to your Mail Server using IMAP/POP 35


Step 1: Install & Configure Dovecot POP3/IMAP Server for Ubuntu 35
Step 2: Configure Dovecot – putting it all-together 36
Step 3: Test Dovecot POP3 37
Step 4: Test Dovecot IMAP 38
Step 5: Accessing your emails from Outside 39
Step 6: Setup Evolution Email Clients 39

Part 7: Installing SquirrelMail for Web 40


Step 1: Installing SquirrelMail on Ubuntu 41
Step 2: Configure Apache2 to accept SquirrelMail 42

Part 8: Adding Users on Ubuntu Server 44

1
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Step 1: Using Userradd Command 44


Step 2: Using Adduser command 45
Step 3: Allowing other users to run sudo 46

Part 9: Troubleshooting Missing eth0 interface 46

Part 10: Need More Training on Linux: 48


Ubuntu Server Administration Training 48

Part 11: Hands-on Labs Assignments 48

http://creativecommons.org/licenses/by-nc-sa/3.0/
A GOV Open Access Technical Academic Publications
Enhancing education & empowering people worldwide through eLearning in the 21st Century

2
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Global Open Versity


IT Systems Integration Hands-on Labs Training Manual

Install Guide Ubuntu 10.04 LTS Server


By Kefa Rabah, krabah@globalopenversity.org May 9, 2010 GTI Institute

1.0 Introduction
In this Hands-on Labs session, we’re going to lean how to install & configure the Linux Ubuntu 10.04 LTS
(Lucid Lynx) server option. Canonical has high hopes that Ubuntu 10.04 LTS (Long Term Support) will
easily become the platform of choice for anybody who intends to build and deploy large-scale enterprise
infrastructure deployment, whether you're trying to build the next Facebook, or the next Google, or the
next eBay. If you want to start on [Amazon's cloud-platform] EC2 and migrate to your own managed
private cloud, Ubuntu 10.04 is going to be the platform for you. Lucid Lynx will be the third LTS release by
Ubuntu. It’s based on open source Debian GNU/Linux. LTS releases arrive bi-annually and are supported
for three years on desktops and five years for servers of free security and maintenance updates.

Ubuntu is an operating system built by a worldwide team of expert developers. It contains all the
applications you need: a web browser, office suite, media apps, instant messaging and much more.
Ubuntu is an open-source alternative to Windows and Office.

Ubuntu 10.04 LTS Server Edition: Lean, fast and powerful – Ubuntu Server delivers services reliably,
predictably and economically - and easily integrates with your existing infrastructure. It has almost 100
open-source and proprietary application providers certifying their programs on Ubuntu Server Edition.
Ubuntu 10.04 includes Alfresco, Ingres, IBM, VMware, Yahoo and Zimbra. It also includes improved
installation and management tools for Ubuntu Enterprise Cloud (UEC) and Amazon EC2.

The Ubuntu promise


• Ubuntu will always be free of charge, along with its regular enterprise releases and security updates
• Ubuntu comes with full commercial support from Canonical and hundreds of companies from across
the world
• Ubuntu provides the best translations and accessibility features that the free software community has
to offer
• Ubuntu core applications are all free and open source. That’s its open source software, free to use,
improve it and pass it on

Solution:
In this Hands-on Lab session, you’ll learn how to setup virtual network on VMware (you may also use any
other virtual machines like MS VirtualPC, Linux Xen, or VirtualBox from Oracle). In this lab session, we’ll
concentrate on installing Linux Ubuntu 10.04 LTS Server which you can then later use to install any other
applications as desired. You will learn how to pre-install DNS server, LAMP server, Mail server, OpenSSL
server, PostgreSQL database, Tomcat Java Server during the initial system installation. I’ll also show you
how set static IP address and how to change hostname. You will also learn how to install GNOME
Desktop, LAMP; DNS server, Postfix mail server with Dovecot for POP3/IMAP, Evolution mail client,
SquirrelMail email Web access and Webmin to help you with administrating and configuring other

1
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

application servers like Apache2, MySQL, FTP, DNS etc. You’ll also have opportunity to learn some
troubleshooting techniques and also do some lab assignments at the end of the lab session.

Part 1: Install & Configure Ubuntu 10.04 LTS Server

Step 1: Getting Started & Hardware Pre-requisites


Ubuntu runs on inexpensive, commodity hardware. To support a small practice like OSCAR, web-server
etc., we recommend a minimum configuration of 200Gb Disk, 2Gb RAM, and a 2GHz Intel Dual Core
CPU. For maximum subsystem compatibility, we suggest that you install the 32bit version of Ubuntu. If
you are purchasing a computer to run OSCAR, one option is to order the machine with Ubuntu pre-
installed.

In this Hands-on Labs, it’s assumed that your target computer is connected to the internet. After installing
the operating system, log into your machine and ensure you perform software updates to bring your
systems up-to-date.

Step 2: Install Linux Ubuntu 10.04 LTS


1. Hope over to http://www.ubuntu.com/getubuntu/download-server website and download the Linux
Ubuntu 10.04 64-bit ISO which at the time of writing this lab manual was "Ubuntu-10.04-server-
amd64.iso"
2. Once you have downloaded the Ubuntu ISO specific to your distribution, you have the option burning
it into CD or just by using the ISO package to install it from your virtual machine, in our case VMware.
3. Fire-up a new virtual machine and perform the initial configuration and setup to use ISO package.
4. Start the virtual machine, and you should be able to see the first Ubuntu installation screen.
5. From Fig. 1, select the language desired and hit Enter key.

Fig. 1
2
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

6. From Fig. 2, select the option desired and then hit the Enter key to commence installation. In our case
we have selected to Install Ubuntu Server option.

Fig. 2
7. From Fig. 3, Choose language screen, select English option, and hit the Enter key.

Fig. 3

3
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

8. From Fig. 4, Choose language screen, Choose a country, select United States option, and hit Enter

Fig. 4

9. From the Ubuntu installer main menu screen, Fig. 5, accept the default selected <No> and hit the
Enter key to continue.

Fig. 5

10. From the Ubuntu installer main menu screen, Fig. 6, Origin of keyboard, select USA and hit
the Enter key to continue.

4
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Fig. 6
11. From the Ubuntu installer main menu screen, Fig. 7, Keyboard layout, select USA and hit the
Enter key to continue.

Fig. 7

5
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

12. From Fig. 8, the Detecting hardware to find CD-ROM drives screen, wait for the system complete
the process.

Fig. 8: System Detecting hardware to find CD-ROM drives

13. From Fig. 9, the Loading additional components screen, wait for the system complete the process.

Fig. 9: System Loading additional components

14. From Fig. 10, the Configure the network screen, enter desired the Hostname: cloud, change as
desired, and hit the Tab key to select <Continue> and hit the Enter key to continue.

Fig. 10

6
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

15. From Fig. 11, the setting up the clock screen, wait for the system to complete the process.

Fig. 11

16. From Fig. 12, the Configure the clock screen, accept the default selection for the time zone, or
change as desired, and then hit the Enter key to continue.

Fig. 12

17. From Fig. 13, the Starting up the partitioner screen, wait for the system to complete the process.

Fig. 13

7
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

18. From Fig. 14, the Partition disks screen, accept the default selection, or change as desired, and then
hit the Enter key to continue.

Fig. 14

19. From Fig. 15, the Partition disks screen, accept the default selection, or change as desired, and then
hit the Enter key to continue.

Fig. 15

8
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

20. From Fig. 16, the Partition disks screen, select <Yes>, or change as desired, and then hit the Enter
key to continue.

Fig. 16

21. From Fig. 17, the Partition disks screen, accept the default selection of 21.2GB, or change as
desired, and then hit the Tab key to select <Continue> and hit the Enter key to continue.

Fig. 17

9
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

22. From Fig. 18, the Partition disks screen, read the warning and then select <Yes>, or change as
desired, and then hit the Enter key to continue.

Fig. 18

23. From Fig. 19, the Partition disks screen, wait for the system to complete the process.

Fig. 19

24. From Fig. 20, the Installing the base system screen, wait for the system to complete the process.

Fig. 20

10
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

25. From Fig. 21, the Setup users and passwords screen, enter the full name of the user: Cloud
Admin, or change as desired, and then select <Continue> and hit the Enter key to continue.

Fig. 21

26. From Fig. 22, the Setup users and passwords screen, enter the username of the user: krabah, or
change as desired, and then select <Continue> and hit the Enter key to continue.

Fig. 22

27. From Fig. 23, the Setup users and passwords screen; enter the password of the user krabah, and
then select <Continue> and hit the Enter key to continue.

11
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Fig. 23
Note: Reenter the password when prompted.

28. From Fig. 24, the Setup users and passwords screen; accepted the selection <No> not to encrypt
your home directory, or change as desired, and then hit the Enter key to continue.

Fig. 24

29. From Fig. 25, the Configuring apt screen, wait for the system to complete the process.

Fig. 25
30. From Fig. 26, the Configuring the package manager screen; leave HTTP proxy blank, hit the Tab
key to select <Continue> and hit the Enter key to continue.

12
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Fig. 26
31. From Fig. 27, the Configuring apt screen, the system will continue with configuring apt, wait for the
system to complete the process.

Fig. 27
32. From Fig. 28, the Select and install software screen, select the desired update option, and hit the
Enter key to continue.

Fig. 28

13
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

33. From Fig. 29, the Select and install software screen, wait for the system to complete the process.

Fig. 29

34. From Fig. 30, the Software selection screen, choose the software to install, and then hit the Enter
key to continue.

Fig. 30

35. From Fig. 31, the Select and install software screen, again wait for the system to complete the
process.

Fig. 31

14
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

36. From Fig. 30, the Configuring mysql-server-5.1 screen; enter a secure password, and then hit the
Tab key to select <Continue> and hit the Enter key to continue.

Fig. 31
Note: Reenter the password when prompted.

37. From Fig. 32, the Postfix Configuration screen; under System mail name: oscarcloud.com, or
change as desired, and then hit the Tab key to select <Continue> and hit the Enter key to continue.

Fig. 32

15
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

38. From Fig. 33, the Select and install software screen, again wait for the system to complete the
process.

Fig. 33

39. From Fig. 34, the Installing GRUB boot loader screen, wait for the system to complete the process.

Fig. 34

40. From Fig. 35, the Installing GRUB boot loader screen, accept the default selection to install GRUB
boot loader, or change as desired, and hit the Enter key to continue.

Fig. 35

16
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

41. From Fig. 36, the Finishing the installation screen, wait for the system to complete the process.

Fig. 36

42. From Fig. 37, the Finish installation screen; Installation complete. Remove the installation
CD, and hit the Enter key to restart the system.

Fig. 37

43. From Fig. 38, you can observer the system startup process.

Fig. 38: Ubuntu cloud server startup process.

17
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

44. Figure 39 shows the login screen, enter your username and password your entered during the
installation stage.

Fig. 39

45. From Fig. 40, enter your username and password, same as the one entered during the installation
stage, and hit enter.

Fig. 40: Ubuntu cloud server with successful login.

46. To check you server IP address, if the Ifconfig command, as shown in Fig. 41.

18
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Fig. 41: Checking server IP address

47. We’re done with this section

Step 3: Update Ubuntu 10.04 Operating Systems


It is useful to update your system with the latest components and system patches. The first command
below asks Ubuntu to update its database of available packages, and the second command installs the
latest packages based on your current configuration. We run the upgrade command twice to ensure that
any packages that may have post-upgrade dependencies also have an opportunity to be upgraded.

1. From the command line, enter the following commands, one at a time.

$ sudo apt-get update


$ sudo apt-get -u upgrade

Note 1: The sudo command is used to run privileged operations on the Ubuntu platform. The first
time you run the command, it will ask for your password. Subsequently, it will not ask for your
password again for a short period of time (typically 15 minutes).

Note 2: apt-get is the program Ubuntu uses for managing the system’s packages. When used to
manipulate the core packages of the operating system, it needs to be run in conjunction with the sudo
command.

2. We’re done with this section

3. You’re now ready to begin any other application installation as desired!

19
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Part 2: Install Optional Additional Packages


If you are a new user and not familiar with command prompt you can install GUI for your Ubuntu LAMP
server using the 2 options

To do so, perform the following procedure:

1. Install desktop Environment


2. Install Webmin

Step 1: Install Desktop Environment


1. First you nee to make sure you have enabled Universe and multiverse repositories in
/etc/apt/sources.list file once you have enable you need to use the following command to
install GUI

sudo apt-get update


sudo apt-get install ubuntu-desktop -y

the above command will install GNOME desktop, see Fig. 42

Fig. 42: GNOME desktop

20
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

2. Alternatively, if you want to install KDE desktop use the following command:

sudo apt-get install kubuntu-desktop -y

3. We’re done with this section

Step 2: Install Webmin


Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you
can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to
manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console
or remotely.Currently There is no Webmin package in the Ubuntu repositories. This tutorial will
explain how to install Webmin in Ubuntu Intrepid Ibex

You can install Webmin for your server web interface to configure Apache2, MySQL, FTP, DNS servers
and many more. Now we will see how to install Webmin in Ubuntu 10.04 LTS.

Preparing your system


1. First you need to install the following packages

sudo aptitude install perl libnet-ssleay-perl openssl libauthen-pam-perl


libpam-runtime libio-pty-perl libmd5-perl apt-show-versions

2. Now download the latest Webmin using the following command or from here

wget http://garr.dl.sourceforge.net/sourceforge/webadmin/webmin_1.441_all.deb

3. Now we have webmin_1.441_all.deb package install this package using the following command

sudo dpkg -i webmin_1.441_all.deb

4. This will complete the installation.

Note: Ubuntu in particular don’t allow logins by the root user by default. However, the user created at
system installation time can use sudo to switch to root. Webmin will allow any user who has this sudo
capability to login with full root privileges.

5. Now you need to open your web browser and enter the following

https://your-server-ip:10000/

Note: on the This Connection is Untrusted page, click I Understand the Risk link, and then click
Add Exception… button. Final click Get Certificate button, followed by Confirm Security Exception
button

21
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

6. Now you should see similar to the following Screen, see Fig. 43.

Fig. 43

7. After login if you want to configure Apache2, MySQL server you need to click on Servers on your left-
hand side you should many servers are ready to configure, as shown in Fig. 44.

Fig. 44: Webmin admin page

8. Click Logout link to exit Webmin

22
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

9. We’re done with this section


Part 3: Perform Additional Optional Tasks

Step 1: Configure Network Interface


In this section, we are going to check and modify the network interface to modify it from dhcp to static IP
address on eth0 interface. If your Ubuntu System has set to use DHCP, you will want to change it to a
static IP address here is simple tip

To do this, perform the following procedure:


4. Fire up your favorite Text editor and open and modify /etc/network/interfaces file, with the
result shown in Fig. 45.

$ sudo nano /etc/network/interfaces

Note: If you are using DHCP for your primary network card which is usually eth0, you will see the
following lines, see Fig. 45
auto eth0
iface eth0 inet dhcp

Fig. 45

Note: as you can see from Fig. 46 above, it’s using DHCP right now.

5. Next, we are going to change DHCP to static, and then there are a number of options that should add
and here is the example and you can change these settings according to your network settings, with
the final result shown in Fig. 46.

auto eth0
iface eth0 inet static
address 192.168.83.40
netmask 255.255.255.0
network 192.168.83.0
broadcast 192.168.83.255
gateway 192.168.83.2

23
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Fig. 46

6. Restart the networking service using the following command

$ sudo /etc/init.d/networking restart

7. To check you server IP address, issue the ifconfig command, as shown in Fig. 47.

Fig. 47: Checking server IP address

8. We’re done with this section

24
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Step 2: Change system hostname


If at the end of the initial installation you decide that you now need a different hostname, you can do so, by
editing the /etc/hostname file

1. Fire-up your favourite Text editor and open /etc/hostname file

2. Change the hostname as desired and save the file and exit
3. Next, we need to edit the /etc/hosts file to reflect our new change

4. Reboot the system for the new changes to take effect


5. We’re done with this section

Part 4: Install DNS Server


In this section it’s assumed that you know how to install and configure a DNS Server on a Linux machine,
if not, then check out our excellent Hands-On Labs training manual, entitled “Using Webmin and Bind9 to
Setup DNS Server on Linux” to get you started. Here we’re going to use Webmin and Bind9 to deploy
DNS Server.

Step 1: Install & Configure Bind9


1. Use apat-get to download and install Bind9, if it’s not already installed, by issuing the following
command:

sudo apt-get install bind9 –y

2. Edit "/etc/hosts" file to reflect the correct hostname, as shown in Fig. 48.

Fig. 48
25
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

3. Edit "/etc/resolv.conf" file to reflect the correct namesearch, domain and search, as shown
in Fig. 49.

Fig. 49

4. Now fire-up your browser and point it to Webmin admin page: http://localhost:10000. Next click on
Servers link on the left-hand pane and then click BIND DNS Server. On the right pane, scroll down to
the Existing DNS Zones heading, as shown in Fig. 50.

Fig. 50

5. Next, configure the DNS server, and when done, you should have a modified Existing DNS Zones
with two additional icons, as shown in Fig. 51.

26
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Fig. 51

6. Now open a new terminal window and test that your DNS server is configured correctly using "dig"
and "nslookup" commands, as shown in Fig. 51 and 52 respectively.

Fig. 52
27
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

7. And similarly for "nslookup", as shown in Fig. 53.

Fig. 53

8. You can also start/stop/restart Bind9 from command-line as follows:

sudo /etc/init.d/bind9 start/stop/restart

9. We’re done with this section

Part 5: Postfix Mail Server


Postfix is the default Mail Transfer Agent (MTA) for Ubuntu. It is in Ubuntu's main repository, which means
that it receives security updates. This section of the hands-on labs session explains how to install and
configure postfix and set it up as an SMTP server using a secure connection.

Step 1: Verify that DNS is working correctly


1. We have already installed and tested that the DNS entries are setup and working correctly, so let's
move on to actually configuring Postfix. By default, Postfix installations on Ubuntu server will only
allow SMTP traffic on the localhost. The output of netstat -nl will show you all ports that have
a dæmon listening; note the line that says 127.0.0.1:25. This means the server is only listening on
the loop back interface for connections on port 25 (SMTP).

2. Test MX Record: In this setup I assume that your domain is "yourdomain.com" and it has a valid
MX record setup as "mail.yourdomain.com". Remember to replace yourdomain.com with your
actual domain in the example codes in this howto, e.g., in our case its: "govholabs.com" and
"mail.govholabs.com". Also I assume that you know what an MX record is. To find out MX your
type in a terminal, see Fig. 54:

28
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Fig. 54

Step 2: Install Postfix Mail


1. In order to install Postfix with SMTP-AUTH and TLS, first install the postfix package from the Main
repository using your favorite package manager. For example:

sudo aptitude install postfix

Simply accept the defaults when the installation process asks questions

Note: In our case we had already installed Postfix during Ubuntu OS installation, so skip this section.

Step 3: Configure Postfix


2. To configure Postfix, issue the following command:

sudo dpkg-reconfigure postfix

Note: you’ll be asked to respond to a few questions.

29
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

3. From Fig. 55, Postfix Configuration, accept the default, tab to OK and hit Enter to continue.

Fig. 55

4. From Fig. 56, Postfix Configuration, accept the default Internet Site, tab to OK and hit the
Enter key to continue.

Fig. 56

30
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

5. From Fig. 57, Postfix Configuration, type the domain name: "govlabs.com", tab to OK and
hit the Enter key to continue.

Fig. 57

6. From Fig. 58, Postfix Configuration, enter root mail recipient, use
"netadmin@govholabs.com", tab to OK and hit the Enter key to continue. (For production
purposes, use password with good complexity!)

Fig. 58

31
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

7. From Fig. 59, Postfix Configuration, enter other destinations for mail:
"ubuntu.govholabs.com, govholabs.com, mail.govholabs.com, ubuntu.localdomain,
localhost" tab to OK and hit the Enter key to continue

Fig. 59

8. From Fig. 60, Postfix Configuration, accept the default <Yes> selection, tab to OK and hit
Enter.

Fig. 60

32
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

9. From Fig. 61, Postfix Configuration, accept the default Local Networks: "127.0.0.1/8,
192.168.83.0/24" selection, tab to OK and hit Enter.

Fig. 61

10. On the next, Postfix Configuration screen, Use Procmail local mail delivery? Accept the
default <No> selection, tab to OK and hit Enter.

11. On the next, Postfix Configuration screen, accept the default “Mailbox size limit: 0” selection,
tab to OK and hit Enter.

12. On the next, Postfix Configuration screen, accept the default “Local address extension
character: +” selection, tab to OK and hit Enter.

13. On the next, Postfix Configuration screen, accept the default “Internet protocols to use: all”
selection, tab to OK and hit Enter.

14. We’re done with this section.

Step 4: Test Postfix default setup


1. Let’s add a user before you start this.

sudo useradd -m -s /bin/bash netadmin


sudo passwd netadmin

2. Test your default installation using the following code segment.

telnet localhost 25

33
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

3. Postfix will prompt like following in the terminal so that you can use to type SMTP commands

Trying 127.0.0.1...
Connected to mail.fossedu.org.
Escape character is '^]'.
220 localhost.localdomain ESMTP Postfix (Ubuntu)

4. Type the following code segment in Postfix's prompt.

ehlo localhost
mail from: root@localhost
rcpt to: netadmin@localhost
data
Subject: Testing my new Postfix mail server

Hello
Just testing my new Postfix mail server.
regards,
Admin
. (Type the .[dot] in a new Line and press Enter )
quit

5. Check the mailbox of netadmin, issue the command:

Step 5: Setup Mailbox


Now is a good time to decide which mailbox format you want to use. By default Postfix will use mbox for
the mailbox format. Rather than editing the configuration file directly, you can use the postconf
command to configure all postfix parameters. The configuration parameters will be stored in
"/etc/postfix/main.cf" file. Later if you wish to re-configure a particular parameter, you can either
run the command or change it manually in the file.

1. To configure the mailbox format for Maildir:

sudo postconf -e 'home_mailbox = Maildir/'

2. You may also need to issue this as well:

sudo postconf -e 'mailbox_command ='

Note: This will place new mail in "/home/username/Maildir" so you will need to configure your
Mail Delivery Agent to use the same path.

3. We’re done with this section


34
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Part 6: Allowing Remote Access to your Mail Server using IMAP/POP


Now that you can accept e-mail from anywhere in the world, have configured your domain, and allowed
relay e-mail for approved clients, you may want to allow remote access to that mail. This can be
accomplished with IMAP or POP3. With a default server install, not all required packages are installed to
make POP/IMAP mail work. These services can be obtained by the installation of the Dovecot.

POP3 is useful when e-mail is checked from only one computer, and is best for people who download
their email, and then work offline. IMAP is the better choice when you would like to check your mail from
multiple computers, at work and home, for example. IMAP has the added benefit of accessing folders on
the server, allowing you to organize your e-mail, and access it from anywhere. IMAPS and POP3S are
more secure than the simple IMAP and POP3 because they use TLS encryption to connect and retrieve
emails.

Dovecot is a Mail Delivery Agent, written with security primarily in mind. It supports the major mailbox
formats: mbox or Maildir. It is a simple and easy to install MDA. This guide explains how to set it up as
an IMAP or POP3 server. For alternate IMAP/POP3 servers see Courier or Cyrus.

Step 1: Install & Configure Dovecot POP3/IMAP Server for Ubuntu


1. Installing and setting up Dovecot in Ubuntu is easy. All we have to do is to install the following
packages: "dovecot-imapd" and "dovecot-pop3d", by issuing the following command:

sudo aptitude install dovecot-imapd dovecot-pop3d

Note: If Dovecot is already installed then skip this part.

2. Choice of protocol type: Once you made your choice between IMP or POP3, then you need to edit
the file /etc/dovecot.conf, and uncomment the following line:

protocols = pop3 pop3s imap imaps

3. In addition, uncomment the following line in pop3 section in the /etc/dovecot.conf:

pop3_uidl_format = %08Xu%08Xv

4. Choice of mailbox type: Dovecot currently supports maildir and mbox formats. They are the most
commonly used mailbox formats. They both have their own benefits, discussed here. Maildir, unlike
mbox, allows for scalability.

• If you have trouble figuring out what you are using, it's most likely mbox. Maildir mails are
almost always stored in ~/Maildir/ directory for each user, which contains cur/, new/ and
tmp/ subdirectories. In maildir each mail is stored in a separate file, while with the mbox format
one file contains all mails in the mailbox. Files in /var/mail/ are nearly always mbox files, one
for each user.

35
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

• Once you have made your choice of mailbox type, you need to amend the file
/etc/dovecot.conf, as follows:

mail_location = maildir:~/Maildir/

5. It's a good idea to pre-create the Maildir for future users:

sudo maildirmake.dovecot /etc/skel/Maildir


sudo maildirmake.dovecot /etc/skel/Maildir/.INBOX
sudo maildirmake.dovecot /etc/skel/Maildir/.Junk
sudo maildirmake.dovecot /etc/skel/Maildir/.Drafts
sudo maildirmake.dovecot /etc/skel/Maildir/.Sent
sudo maildirmake.dovecot /etc/skel/Maildir/.Trash
sudo maildirmake.dovecot /etc/skel/Maildir/.Templates

Note: For an existent user:

sudo cp -r /etc/skel/Maildir /home/myuser/


sudo chown -R myuser:usergroup /home/myuser/Maildir
sudo chmod -R 700 /home/myuser/Maildir

6. You’re done with initial Dovecot POP3/IMAP pre-requisites.

Step 2: Configure Dovecot – putting it all-together


1. To configure Dovecot we need to edit the file /etc/dovecot/dovecot.conf, which you can open
using your favorite Text editor. We need to change a few key items suggested in Step 1. Find the
following keys and change its values as follows:

protocols = pop3 pop3s imap imaps


mail_location = maildir:~/Maildir/
pop3_uidl_format = %08Xu%08Xv
imap_client_workarounds = delay-newmail outlook-idle netscape-eoh
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh

• Note: For 64-bit users: Add the line login_process_size = 64 in the file
/etc/dovecot/dovecot.conf.

• Lines starting with # are comments. The last two lines enable workarounds for various client
bugs. Save the file after completing your changes.

2. Start the dovecot service. Run:

sudo /etc/init.d/dovecot restart

36
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Note 1: To check that it is running, type the command ps –A |grep dovecot. You should see the
dovecot service running, as shown in Fig. 62.

Fig. 62

Note 2: If you have enabled imap, or pop3, you can also try to log in with the commands "telnet
localhost pop3" or "telnet localhost imap2". If you see something like the following, the
installation has been successful

Step 3: Test Dovecot POP3


1. Click Applications > Accessories, and click Terminal. This will launch the Terminal
window. Issue the highlighted commands shown below to start sample dovecot session. (Replace
krabah and password with any valid user name and password.)

telnet mail.govholabs.com pop3


Trying 192.168.83.40...
Connected to govholabs.com (192.168.83.40).
Escape character is '^]'.
+OK Dovecot ready.

3. To retrieve and read your email, perform the following procedure:

krabah@ubuntu:~$ telnet mail.govholabs.com pop3


Trying 192.168.83.40...
Connected to govholabs.com.
Escape character is '^]'.
+OK Dovecot ready.
user krabah
+OK
pass password
+OK Logged in.
list
+OK 1 messages:
1 536
.
retr 1
+OK 536 octets
Return-Path: <root@localhost>
X-Original-To: krabah@localhost
Delivered-To: krabah@localhost
Received: from localhost (unknown [IPv6:::1])
by ubuntu.localdomain (Postfix) with ESMTP id 4D8D081791

37
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

for <krabah@localhost>; Tue, 22 Jun 2010 17:44:58 -0700 (PDT)


Subject: Testing my new Postfix mail server
Message-Id: <20100623004529.4D8D081791@ubuntu.localdomain>
Date: Tue, 22 Jun 2010 17:44:58 -0700 (PDT)
From: root@localhost
To: undisclosed-recipients:;

Hello
Just testing my new Postfix mail server.
regards
Admin
.
quit
+OK Logging out.
Connection closed by foreign host.
krabah@ubuntu:~$

• Note 1: This works great as we’re able to receive the email send to dsmith@govholabs.com from
krabah@govholabs.com earlier using SMPT protocol.

• Note 2: If you encounter any problems, check the log file at /var/log/maillog.

Step 4: Test Dovecot IMAP


1. Let’s now perform a telnet test, this time using IMAP protocol.

krabah@ubuntu:~$ telnet mail.govholabs.com imap


Trying 192.168.83.40...
Connected to govholabs.com.
Escape character is '^]'.
* OK Dovecot ready.
1 login krabah password
1 OK Logged in
1 list "" "*"
* LIST (\HasNoChildren) "." "INBOX"
1 OK List completed.
1 logout
* BYE Logging out
1 OK Logout completed.
Connection closed by foreign host.
krabah@ubuntu:~$

38
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Step 5: Accessing your emails from Outside


1. In order to access your mail server from another computer, you'll have to configure your firewall or
router to allow connections to the server on the necessary ports:

IMAP - 143
IMAPS - 993
POP3 - 110
POP3S - 995

2. You'll also need to uncomment following line in /etc/dovecot/dovecot.conf:

listen = *

3. We’re done with this section

Note: Your e-mail server is now working and providing service to your users. There are many more
configurations for sendmail and POP/IMAP that are beyond the scope of this article. Linux will provide
a very stable, robust platform for your e-mail needs. To find more information about Postfix visit
www.postfix.org.

Step 6: Setup Evolution Email Clients


4. Now send a test e-mail to your new server and connect to the server via your favorite pop client, eg..,
Evolution mail client. You should now be able to access your e-mail via POP protocol. You can check
a great HowTo article on "Step-by-Step Install Guide for Evolution Mail Client with Addressbook using
LDAP on Linux v1.2" from Scribd.com.
5. When done with the setup you able to access your emails as earlier tested from command-line, as
shown in Fig. 63. When done composing the email, hit the Send button.

Fig. 63
39
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

6. Let’s fire an email to user "netadmin@govholabs.com", as shown in Fig. 64.

Fig. 64

7. We’re done with this section.

Part 7: Installing SquirrelMail for Web


SquirrelMail is a web-based email application started by Nathan and Luke Ehresman It’s written in the
PHP scripting language. It can be installed on almost all web servers as long as PHP is present and the
web server has access to an IMAP and SMTP server.

SquirrelMail outputs valid HTML 4.0 for its presentation, making it compatible with a majority of current
web browsers. SquirrelMail uses a plug-in architecture to accommodate additional features around the
core application, and has over 200 plug-ins are available on the SquirrelMail website

Licensed under the GNU General Public License, SquirrelMail is free software. It is currently available in
over 50 languages. SquirrelMail is included in many major GNU/Linux distributions and is independently
downloaded by tens of thousands of people every day.

40
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Step 1: Installing SquirrelMail on Ubuntu


To install SquirrelMail on Ubuntu Linux server, perform the following procedure:

1. Issue the apt-get install as follows:

sudo apt-get install squirrelmail

2. When with installation, run:

/usr/sbin/squirrelmail-configure as root to configure/upgrade config.

SquirrelMail Configuration : Read: config.php (1.4.0)


---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages

D. Set pre-defined settings for specific IMAP servers

C Turn color on
S Save data
Q Quit

Command >> D

3. Select option "D" form above listing, which generates the listing below. From the listing below, select
"Dovecot" as our IMAP server.

SquirrelMail Configuration : Read: config.php


---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others. If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct. This does not change everything. There are

41
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

only a few settings that this will change.

Please select your IMAP server:


bincimap = Binc IMAP server
courier = Courier IMAP server
cyrus = Cyrus IMAP server
dovecot = Dovecot Secure IMAP server
exchange = Microsoft Exchange IMAP server
hmailserver = hMailServer
macosx = Mac OS X Mailserver
mercury32 = Mercury/32
uw = University of Washington's IMAP server
gmail = IMAP access to Google mail (Gmail) accounts

quit = Do not change anything


Command >> dovecot

imap_server_type = dovecot
default_folder_prefix = INBOX.
trash_folder = Trash
sent_folder = Sent
draft_folder = Drafts
show_prefix_option = false
default_sub_of_inbox = false
show_contain_subfolders_option = false
optional_delimiter = .
delete_folder = true

4. Finally, select option "S" to save our SquirrelMail configuration settings, followed by option "Q" to
quite.

5. We’re done with this section.

Step 2: Configure Apache2 to accept SquirrelMail


6. Now we need to setup SquirrelMail to run under Apache2. To do this, edit Apache2 configuration file
"/etc/apache2/apache2.conf" and insert the following line:

Include /etc/squirrelmail/apache.conf

7. Fire-up your favorite browser and point your browser to: http://yourdomain/squirrelmail
In our case: http://mail.govholabs.com/squirrelmail, see Fig. 65.

42
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Fig.65: SquirrelMail login page

8. Now login with user: "netadmin" and password: "xxxxxxx", change as desired, see Fig. 66.

Fig. 66

Note: You should be able to access your emails on the web as shown in Fig. 67. As can be observed,
Netadmin has two emails, one form the root user, and other, which had just send earlier in Part 7,
section 6.

43
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Fig.67: Netadmin‘s emails using SquirrelMail

9. Have a happy email access over the web with SquirrelMail!

10. We’re done with this section on SquirrelMail setup.

Part 8: Adding Users on Ubuntu Server


As you might have realized by now that Ubuntu Server is like any Linux distro, and has full multi-user
capabilities, and a common task on any server is adding users.

Step 1: Using Userradd Command


1. The simple form is:

useradd

2. The useradd command will let you add a new user easily from the command line:

useradd <username>

3. This command adds the user, but without any extra options, and therefore, your user won’t have a
password or a home directory.

44
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

4. You can use the -d option to set the home directory for the user. The -m option will force useradd to
create the home directory. We’ll try creating a user account with those options, and then use the
passwd command to set the password for the account.

5. You can alternatively set a password using -p on the useradd command, but it’s preferable to set
the password using passwd.

sudo useradd -d /home/netuser -m netuser

sudo passwd netuser

Note: This will create the user named netuser and give them their own home directory in
/home/netuser. The files in the new home directory are copied from the /etc/skel folder, which
contains default home directory files. However, if you wanted to set default values for your users, you
would do so by modifying or adding files in that directory. If we take a look at the new home directory
for the user:

krabah@ubuntu:/etc/skel$ ls -la /home/netuser/


total 24
drwxr-xr-x 2 netuser netuser 4096 2010-08-14 01:44 .
drwxr-xr-x 5 root root 4096 2010-08-14 01:44 ..
-rw-r--r-- 1 netuser netuser 220 2010-04-18 19:15 .bash_logout
-rw-r--r-- 1 netuser netuser 3103 2010-04-18 19:15 .bashrc
-rw-r--r-- 1 netuser netuser 179 2010-03-26 05:31 examples.desktop
-rw-r--r-- 1 netuser netuser 675 2010-04-18 19:15 .profile
krabah@ubuntu:/etc/skel$

Step 2: Using Adduser command


1. You’ll notice that there are bash scripts in this directory. If you wanted to set default path options for all
new users, you would do so by modifying the files in /etc/skel, which would then be used to create
these files by the useradd command.

adduser

2. The adduser command is even easier than the useradd command, because it prompts you for each
piece of information required. You may find it ironical that there are two virtually identically named
commands that do the same thing, but that’s Linux for you. Here’s the syntax:

adduser <username>

3. Let’s do an example to add user szulu, as follows:

krabah@ubuntu:~$ sudo adduser szulu

45
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

[sudo] password for netadmin:


Adding user `szulu' ...
Adding new group `szulu' (1001) ...
Adding new user `szulu' (1001) with group `szulu' ...
Creating home directory `/home/szulu' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for szulu
Enter the new value, or press ENTER for the default
Full Name []: Shaka Zulu
Room Number []: 111
Work Phone []: 111-222-4444
Home Phone []: 111-333-5555
Other []: Tech Admin
Is the information correct? [Y/n] y
krabah@ubuntu:~$

4. You’re done with this section

Step 3: Allowing other users to run sudo


1. To add a new user to sudo, open the Users and Groups tool from System Æ Administration menu.
Then click on the respective user and then on properties. Choose the User Privileges tab. In the tab,
find Administer the system and check that.

Note: In Hardy Heron and newer, you must first Unlock, then you can select a user from the list and
hit Properties. Choose the User Privileges tab and check Administer the system.

From the terminal this would be:

sudo adduser<username> admin

where you replace <username> with the name of the user (without the <>).

5. You’re done with this section

Part 9: Troubleshooting Missing eth0 interface


In case after installing your Ubuntu 10.4 LTS, and issue the Ifconfig command, and noticed that your eth0
device is missing, as shown in Fig. 64.

46
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

Fig. 64

Then perform the following procedure to solve the problem, also check here:

1. First look at /etc/udev/rules.d/70-persitent-net.rules. My file looked like this:

Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000)


SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:0c:29:d0:e5:64", ATTR{dev_id}=="0x0", ATTR{type}=="1",
KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100f (e1000)


SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:0c:29:06:1a:b6", ATTR{dev_id}=="0x0", ATTR{type}=="1",
KERNEL=="eth*", NAME="eth1"

2. My old device was the first one, and my new device was the second one. I just commented out the
first device lines, #, (now green font) and changed the second name to 'eth0', like so:

Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000)

47
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

# SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",


ATTR{address}=="00:0c:29:d0:e5:64", ATTR{dev_id}=="0x0", ATTR{type}=="1",
KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100f (e1000)


SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:0c:29:06:1a:b6", ATTR{dev_id}=="0x0", ATTR{type}=="1",
KERNEL=="eth*", NAME="eth0"

3. Next re-start your Linux box followed by "ifconfig" command to verify that your eth0 interface is
working correctly.

4. We’re done with this section

Part 10: Need More Training on Linux:


Are you having trouble understanding or comprehending the working of Linux OS, if so, then check out
some of our introductory courses on Linux at: Global Open Versity, Vancouver Canada.

Ubuntu Server Administration Training


You can now register and take our superb Ubuntu Server Training course, covering Ubuntu 10.04 LTS,
EHCP and ISPConfig ISP hosting solutions, RESTORE backup, EJBCA PKI and DTC GPLHost Control
Panel solutions and many more…

• ICT105 - Ubuntu Server Administration Training

Call us today:
Email: info@globalopenversity.org. URL: www.globalopenversity.org

Part 11: Hands-on Labs Assignments


1. Install and configure DNS servers
2. Install and configure a LAMP and messaging servers for your network infrastructure
3. Install Postfix mail server and Evolution mail client
4. Secure your email server using SSL
5. Lockdown your server by installing and configuring; Clamd, ClamAV and MailScanner.

Note 1: A good point to start from is to check out previous article on Postfix mail server on Linux

• Install Guide Secure Postfix Messaging Server with Dovecot and ClamAV on Linux v1.2

Note 2: Alternatively you also be interested to install an alternative mail server: Sendmail mail server
is also open source messaging software

48
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training


Global Open Versity ICT Labs Install Guide Linux Ubuntu 10.04 LTS Linux Server v1.5

• Deploy Secure Messaging Solutions using Sendmail & Dovecot Servers with ClamAV on Linux

Linux Administration Training


Make a smart move, its time you reconfigure your skill-sets and move your career into the fastest moving
high tech gravy train of the Linux Open Source world, join our Linux program today:

• Linux Enterprise Infrastructure Engineering Diploma – ICT202

-----------------------------------------------
Kefa Rabah is the Founder of Global Technology Solutions Institute. Kefa is knowledgeable in several
fields of Science & Technology, Information Security Compliance and Project Management, and
Renewable Energy Systems. He is also the founder of Global Open Versity, a place to enhance your
educating and career goals using the latest innovations and technologies.

Fellow us on Twitter: Global Open Versity and Kefa Rabah

A GOV Open Access Technical Academic Publications


Enhancing education & empowering people worldwide through eLearning in the 21st Century
49
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org ICT105 – Ubuntu Server Administration Training

S-ar putea să vă placă și