Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Administration
Workbook
3116
www.novell.com
A U T H O R I Z E D C O U R S E WA R E
Part # 100-005293-001-REV A
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Legal Notices
Novell, Inc., makes no representations or warranties with respect to the contents
or use of this documentation, and specifically disclaims any express or implied
warranties of merchantability or fitness for any particular purpose. Further,
Novell, Inc., reserves the right to revise this publication and to make changes to
its content, at any time, without obligation to notify any person or entity of such
revisions or changes.
Further, Novell, Inc., makes no representations or warranties with respect to any
software, and specifically disclaims any express or implied warranties of
merchantability or fitness for any particular purpose. Further, Novell, Inc.,
reserves the right to make changes to any and all parts of Novell software, at any
time, without any obligation to notify any person or entity of such changes.
Any products or technical information provided under this Agreement may be
subject to U.S. export controls and the trade laws of other countries. You agree to
comply with all export control regulations and to obtain any required licenses or
classification to export, re-export or import deliverables. You agree not to export
or re-export to entities on the current U.S. export exclusion lists or to any
embargoed or terrorist countries as specified in the U.S. export laws. You agree
to not use deliverables for prohibited nuclear, missile, or chemical biological
weaponry end uses. See the Novell International Trade Services Web page (http:/
/www.novell.com/info/exports/) for more information on exporting Novell
software. Novell assumes no responsibility for your failure to obtain any
necessary export approvals.
Copyright 2008 Novell, Inc. All rights reserved. No part of this publication
may be reproduced, photocopied, stored on a retrieval system, or transmitted
without the express written consent of the publisher.
Novell Trademarks
For Novell trademarks, see the Novell Trademark and Service Mark list (http://
www.novell.com/company/legal/trademarks/tmlist.html).
Third-Party Materials
All third-party trademarks are the property of their respective owners.
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Contents
SUSELni uxEnterpsi eServer1 SP2Adminstratoi n/Workbo k1
SECTION 1
Exercise 1-1
SECTION 2
Exercise 2-1
Exercise 2-2
SECTION 3
Exercise 3-1
SECTION 4
Exercise 4-1
Exercise 4-2
Exercise 4-3
Exercise 4-4
Version 1
Introduction
Course Scenario
Set Up da-host
10
Set Up da1
15
Set Up da2
15
16
17
23
24
27
27
28
29
30
31
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
37
38
38
40
42
44
44
44
48
48
50
51
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
SECTION 5
Exercise 5-1
SECTION 6
Exercise 6-1
Exercise 6-2
Exercise 6-3
SECTION 7
Exercise 7-1
Exercise 7-2
Exercise 7-3
Exercise 7-4
SECTION 8
Exercise 8-1
Exercise 8-2
SECTION 9
Exercise 9-1
SECTION 10
Exercise 10-1
Exercise 10-2
Exercise 10-3
Exercise 10-4
Exercise 10-5
Exercise 10-6
53
Manage Hardware
54
54
54
55
55
57
63
64
66
68
68
68
69
69
71
73
74
76
76
78
81
85
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
86
87
87
87
89
91
93
93
93
95
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
SECTION 11
Exercise 11-1
Exercise 11-2
Exercise 11-3
Exercise 11-4
Exercise 11-5
Version 1
97
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Introduction
Introduction
This workbook is designed to help you practice the skills associated with SUSE Linux
Enterprise Server 11 Administration (Course 3116) objectives.
These skills, along with those taught in SUSE Linux Enterprise Server 11
Fundamentals (Course 3115), prepare you to take the Novell Certified Linux
Administrator 11 (Novell CLA 11) certification test.
Before starting the exercises in this workbook, you need do the following:
3116 Course Manual. Printed course manual that contains instructional and
reference content.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Minimum Requirements
Hardware
Monitor
60
DVD
drive
Reader 9.x
SUSE
Course Scenario
The exercises in this course center around the fictional Digital Airlines Company that
has offices at various airports around the globe.
The Digital Airlines management has made the decision to migrate several back-end
services to Linux servers running SUSE Linux Enterprise Server 11 SP2.
Your task is to set up a lab environment with SUSE Linux Enterprise Server 11 SP2
and to familiarize yourself with it.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Introduction
You need to learn how to do the following to be able to adminster SLES 11 SP2 in
Digital Airlines IT environment:
Administer storage
Manage hardware
Automate tasks
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Set Up da-host
da-host is the machine where you work most of the time during the exercises. This
machine will host the da1 VMware virtual machine that you install in Section 1 of the
course.
To install da-host, you can use one of the following methods:
On the course CD in the setup directory, you can find an AutoYaST XML file for
the installation of da-host, called 3116-da-host.xml. Depending on your hosts
hardware, copy the file to another storage device:
Table Intro-2
Copies of da-host.xml
Available Hardware
2 CD/DVD drives
No copy needed
USB port
Be sure there are no data on the server that you still need, because all existing
data on the hard disk will be erased.
2.
Boot the server from the SUSE Linux Enterprise Server 11 SP2 Product DVD. If
your hardware supports it, use the x86_64 DVD, otherwise the DVD for the i586
architecture.
3.
When the installation screen appears, highlight the Installation option by using
the arrow keys.
You have 20 seconds to highlight the option before GRUB boots from the hard
drive.
10
4.
Set the display resolution by pressing F2; then select the display resolution
matching your monitor; it should not be less than 1024x768.
5.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Introduction
6.
In the Boot Options field, type the following (depending on the media containing
the 3116-da-host.xml file):
instmode=cd
instmode=cd
instmode=cd
(Conditional) If the installation stops at some early point, reset the computer,
restart the installation and try one of the other installation options, like
InstallationACPI Disabled.
Boot your Workstation with the SUSE Linux Enterprise Server 11 SP2 DVD.
Wait while the machine boots.
2.
When the GRUB installation screen appears, highlight the Installation option by
using the arrow keys.
You have 20 seconds to highlight the option before GRUB boots from the hard
drive.
Version 1
3.
Set the display resolution by pressing F2, then select the display resolution that
matches your monitor. It should not be less than 1024x768.
4.
Make sure that the correct keyboard layout is selected in the Keyboard
Layout menu. If not, select Keyboard Layout and choose your layout.
b.
5.
6.
From the Installation Mode dialog, make sure that New Installation is selected,
then click Next.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
11
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
7.
From the Clock and Time Zone dialog, select your time zone, then click
Change.
b.
Set the Current Time and Current Date to match your current time and date;
then select Accept.
Time is set according to the 24-hour clock format. The date format is dd/
mm/yyyy.
c.
Click Next.
8.
In the Server Base Scenario dialog, ensure that Physical Machine is selected,
then click Next.
9.
Select Partitioning.
The Preparing Hard Disk dialog appears.
ii.
Select your hard disk (the first hard disk entry), then click Next.
iii.
iv.
Make sure none of the Proposal setup settings are selected, then select
Next.
You are returned to the Installation Settings overview dialog.
b.
ii.
iii.
iv.
c.
Click Install.
d.
12
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Introduction
10.
In the Password for the System Administrator root dialog, as password type
novell, then click Next. Confirm the warning by clicking Yes.
11.
In the Hostname and Domain Name dialog type the following information:
Hostname: da-host
From the Network Configuration dialog, beneath the Firewall entry, click on
disable next to Firewall is enabled.
The line will change to Firewall is disabled.
b.
13.
From the Test Internet Connection dialog, select No, Skip This Test, then click
Next.
14.
In the Installation Overview dialog, make sure that Use Following Configuration
is selected.
Under CA Management, make sure that the Server Name is dahost.digitalairlines.com and the E-Mail is postmaster@digitalairlines.com. If
not, select CA Management > Edit Default Settings and correct the Server Name
to da-host.digitalairlines.com and E-Mail to postmaster@digitalairlines.com.
Click Next to return to the Installation Overview dialog.
Click Next to continue.
15.
16.
In the New Local User dialog, enter the following, then click Next
Username: geeko
Password: novell
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
13
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
18.
In the Hardware Configuration dialog, make sure that the values for Resolution
and Monitor are correct for your hardware, then click Next.
19.
20.
Remove the SUSE Linux Enterprise Server 11 SP2 DVD from your DVD drive.
Download the VMware Player for Linux software (for i386 or x86_64,
depending on the architecture of SLES 11 SP2 installed on da-host) from
www.vmware.com (http://www.vmware.com/go/downloadplayer/) and copy it to
the /tmp/ directory.
2.
3.
4.
5.
Unpack the da1-3116.zip and da2-3116.zip archives from the setup directory
on the Student DVD:
cd /vmware
unzip /path/to/da1-3116.zip
chown -R geeko: /vmware/3116-da1
unzip /path/to/da1-3117.zip
chown -R geeko: /vmware/3117-da1
6.
7.
To make sure the settings in the file take effect, reboot your computer.
8.
9.
14
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Introduction
The other address you see in the output above (192.168.172.1/24) is the address
VMware Player assigns to the interface. It is not relevant, as da1 uses a fixed IP
address (172.17.8.101/16) and does not rely on IP addresses being distributed by
VMware Player via DHCP.
Set Up da1
da1 is a SUSE Linux Enterprise Server 11 SP2. This virtual machine is installed in
Exercise 1 of Section 1 and then used in some of the subsequent exercises.
As the machine will be installed as par of an exercise, there is no setup required at
this point beyond the copying of the files described under Install VMware Player
on page 14.
Set Up da2
da2 is a SUSE Linux Enterprise Server 11 SP2 with BtrFS used as the / (root) file
system. This virtual machine is used in Section 10 (but you could also use it as a
replacement for da1 in other Sections if you, for some reason, did not install da1 in
Section 1).
To set up the machine, do the following:
1.
As user Geeko, open the main menu, click More Applications and select System
> VMware Player.
2.
3.
4.
5.
6.
Select da2 in the left pane and click Play virtual machine.
When prompted whether you moved or copied the VM, click I copied it.
The virtual machine starts.
7.
Version 1
To change the keyboard layout within the virtual machine from US English to
another one, do the following:
a.
b.
Start YaST (root password: novell) and select System > Language.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
15
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
8.
c.
Set Primary Language to your language and select Adapt Keyboard Layout
to your language and click OK.
d.
Open a terminal window and ping da-host with the following command:
ping da-host.digitalairlines.com
You should see echo replies.
9.
Select: The word select is used in exercise steps to indicate a variety of actions
including clicking a button on the interface and selecting a menu item.
Enter and Type: The words enter and type have distinct meanings.
The word enter means to type text in a field or at a command line and press the
Enter key when necessary. The word type means to type text without pressing the
Enter key.
If you are directed to type a value, make sure you do not also press the Enter key
or you might activate a process that you are not ready to start.
16
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
SECTION 1
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
17
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 1-1
1 GB swap partition.
6 GB for / (You should leave unpartitioned space on the hard disk to add
partitions in later exercises).
Use default software patterns, but add the C/C++ Compiler and Tools pattern.
IP address: 172.17.8.101
Hostname: da1
Use local authentication. Create a geeko user account with a password of novell.
Insert your SLES 11 SP2 installation DVD into your host workstations DVD
drive.
2.
As user Geeko, open the main menu, click More Applications and select System
> VMware Player.
3.
4.
5.
6.
7.
Select da1 in the left pane and click Play virtual machine.
The virtual machine starts.
8.
When the GRUB installation screen appears, select Installation with the arrow
keys and then press Enter.
Wait while Linux is loaded and the YaST Installation module starts.
18
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
9.
In the Welcome dialog, select your language and your keyboard layout from the
Language and Keyboard Layour drop-down menus
NOTE: Although you can select any available language, the exercises in this manual are
written for English US.
10.
In the same dialog, select I Agree to the License Terms, then click Next.
11.
12.
In the Installation Mode dialog, select New Installation, then click Next.
13.
In the Clock and Time Zone dialog, select your time zone and deselect Hardware
Clock Set To UTC.
Click Next to continue.
14.
In the Server Base Scenario screen, select Physical Machine, then click Next.
The Installation Settings proposal dialog appears.
15.
16.
In the Prepare Hard Disk dialog, select Custom Partitioning (for experts), then
click Next.
17.
18.
a.
b.
Select Add.
c.
d.
e.
Click Next.
f.
g.
Select Add.
b.
c.
d.
Click Next.
e.
f.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
19
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
19.
Confirm the partitioning setup and return to the Installation Settings by clicking
Accept.
20.
21.
Under Patterns, scroll down as needed and select C/C++ Compiler and Tools.
Click OK to return to the Installation Settings dialog.
If prompted to accept license agreements for packages to be installed, select
Accept.
22.
23.
24.
In the Password for the System Administrator root screen, enter novell in the
password fields.
Click Next to continue.
Confirm the password warning by clicking Yes.
25.
In the Hostname and Domain Name dialog, enter da1 in the Hostname field and
digitalairlines.com in the Domain Name field.
Deselect Change Hostname via DHCP.
Deselect Assign Hostname to Loopback IP.
Click Next to continue.
26.
27.
28.
In the Network Settings dialog, select the first detected network card, then click
Edit.
29.
20
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
32.
33.
In the Test Internet Connection dialog, select No, Skip This Test, then click Next.
34.
In the Network Services Configuration, make sure that the values under CA
Management are correct.
If there are incorrect values, correct them by clicking on CA Management > Edit
Default Settings. Correct entries as needed and return to the Network Services
Configuration dialog by clicking Next twice.
Click Next to continue.
35.
In the User Authentication Method screen, select Local (/etc/passwd), then click
Next.
36.
In the New Local User screen, add a user named geeko by entering the following:
Password: novell
37.
38.
39.
In the Release Notes screen, review the release notes, then click Next.
40.
41.
42.
(Conditional) If your da-host machine has an Internet connection, you can install
VMware Tools in your SLES 11 virtual machine by doing the following:
a.
In your VMware window, select Virtural Machine > Removable Devices >
CD/DVD > Disconnect.
b.
In your VMware window, select Virtual Machine > Install VMware Tools >
Download and Install > Install.
c.
d.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
21
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
In the File Roller window that opens up, select Extract and then select a
directory for the vmware-tools-distrib directory, such as geekos
home directory.
The files will be extracted to the location you specify.
e.
f.
g.
h.
i.
j.
In your VMware window, select Virtual Machine > Removable Devices >
CD/DVD > Connect to /dev/sr0.
k.
When prompted for the root users password, enter novell and click
Authenticate.
l.
m.
(End of Exercise)
22
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
SECTION 2
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
23
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 2-1
If your da1 virtual server is suspended, resume it. If it is turned off, turn it on and
continue with Step 6.
2.
3.
4.
5.
6.
When the GRUB boot menu is displayed, press Space to stop the timer.
7.
In the Boot Options field, replace the vga=0xxxx option with init=/bin/bash
amd press Enter.
After a few moments, the bash prompt is displayed:
8.
Enter mount to find out if the root (/) partition is mounted writable. If not,
remount the root partition read-writable by entering
mount -o remount,rw,sync /
9.
24
10.
Press Ins.
11.
Position the cursor at the beginning of the line starting with gfxmenu.
12.
Comment out the line by inserting a pound sign (#) in front of the line starting
with gfxmenu.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
13.
Add a new, blank line after the gfxmenu line you just commented out.
b.
Press Esc.
c.
Enter :r!
crypt.
echo
-e
secret\nsecret
grub-md5-
This runs an external command from within the vi editor. The echo
command sends the secret and secret text strings to the standard input
of the grub-md5-crypt command.
The grub-md5-crypt command uses these strings as input for its
Password: and Retype Password: prompts. It then encrypts the password.
The output from grub-md5-crypt command is inserted into the file,
including the encrypted password:
# Modified by YaST2. Last modification on Wed Sep 26
10:10:28 CEST 2012
default 0
timeout 8
##YaST - generic_mbr
#gfxmenu (hd0,1)/boot/message
stty: standard input: Invalid argument
Password:
Retype password:
stty: standard input: Invalid argument
$1$Ihe5r0$4H7xQDaVkzAmL93O7145w0
##YaST - activate
###Don't change this comment - YaST2 identifier: Original
name: linux###
title SUSE Linux Enterprise Server 11 SP2 - 3.0.13-0.27
root (hd0,1)
kernel /boot/vmlinuz-3.0.13-0.27-pae root=/dev/sda2
resume=/dev/sda1 splash=silent showopts vga=0x317
initrd /boot/initrd-3.0.13-0.27-pae
...
d.
e.
f.
g.
Press Ins.
h.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
25
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
15.
If you want to edit the kernel command line, press p and then enter a password of
secret.
16.
Select the SUSE Linux Enterprise Server 11 SP2 menu option and press Enter.
Wait while the system boots.
17.
b.
c.
d.
Press Ins.
e.
Put a comment sign (#) at the beginning of the line beginning with
password.
f.
Remove the comment sign in front of the line starting with gfxmenu.
g.
Save the file and close vi by pressing Esc and entering :wq.
h.
(End of Exercise)
26
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 2-2
Manage Runlevels
In this exercise, you practice configuring runlevels.
This exercise has four parts.
In the first part, you use the runlevel command to determine the current runlevel.
You also use the init command to change to runlevel 3 and then back to 5.
In the second part, you activate the at service atd.
In the third part, you reboot your computer and boot into runlevel 3 instead of the
default runlevel 5. You then log in and switch to back to runlevel 5.
In the fourth part, you activate the rsyncd daemon using the YaST runlevel editor.
Complete the following:
2.
3.
Check the previous and current runlevels by entering runlevel at the shell
prompt.
List the runlevels in the table below:
Table 2-1
Runlevels
Previous
Current
Notice that the previous runlevel is listed as N, which means that there was no
previous runlevel set.
4.
5.
6.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
27
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Table 2-2
Runlevels
Previous
7.
Current
8.
2.
3.
4.
5.
6.
7.
List the atd files in the directory by entering ls -l *atd at the shell prompt.
Notice that there are two atd linksone is used to start the atd service and one
is used to kill it:
8.
9.
Verify that the service is running by entering rcatd status at the shell
prompt.
10.
11.
28
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
12.
You should be still be logged in as root. Verify this by entering whoami at the
shell prompt.
13.
14.
15.
16.
Switch back to your previous runlevel (5) by entering init 5 at the shell
prompt.
The GUI login screen appears.
17.
18.
19.
20.
From the command line, remove the atd service from system startup runlevels
by entering chkconfig atd off.
21.
View the current runlevel configuration for at by entering chkconfig atd l at the shell prompt.
Notice that the service is off for all runlevels.
22.
23.
Version 1
1.
2.
When the GRUB boot menu is displayed, press Space to stop the timer.
3.
In the Boot Options field, add the number 3 at the end of the line.
4.
5.
When the login prompt appears, log in as root with a password of novell.
6.
7.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
29
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
8.
9.
10.
Press Ctrl+c.
11.
12.
2.
3.
4.
5.
6.
Below the list, configure this service to start at runlevels 3 and 5 by selecting 3
and 5.
7.
8.
Start the rsyncd service by selecting Start Now from the Start/Stop/Refresh
drop-down list.
A status message appears indicating that the service started successfully.
9.
10.
11.
12.
13.
(End of Exercise)
30
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
SECTION 3
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
31
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 3-1
2.
3.
At the command line, display the processes that are currently owned by geeko by
entering
ps -lU geeko (with a lowercase L)
4.
5.
6.
Arrange the calculator window and the terminal window so that you can see them
both; then select the terminal window to activate it.
7.
8.
9.
10.
View the gcalctool process running from the current terminal by entering
ps -l (with a lower case L)
The process shows a status of T, which indicates that it is being traced or
stopped.
32
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
11.
12.
13.
14.
15.
16.
17.
18.
19.
View only the processes started by root by typing u, then entering root.
20.
21.
(Conditional) If you cannot find the gcalctool program, try maximizing the
terminal window. You can also activate the Calculator window and use it to
calculate several numbers. This should cause the gcalctool process to be
moved near the top of the output in top.
You can also enter F in top and select PID as the sort column. If needed, you can
also reverse the sort order by pressing R.
22.
23.
24.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
33
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
25.
Switch to your root user account using the su - command and a password of
novell.
26.
Stop the calculator program and check the status by entering the following
commands:
kill PID_of_gcalctool_process
ps aux | grep gcalctool
27.
28.
Switch back to your geeko user by entering exit at the shell prompt.
2.
3.
4.
5.
6.
7.
8.
9.
34
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Change the nice value for the gcalctools process to a higher priority by entering
renice -10 -p PID_of_gcalctools_process
11.
Verify that the gcalctools process nice value is set to -10 by entering
ps alf (with a lower case L)
12.
13.
Start the xeyes program in the background with the nice value of +10 by entering
nice xeyes&
14.
Verify that the xeyes process nice value is set to +10 by entering
ps lf (with a lower case L)
15.
16.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
35
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
36
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
SECTION 4
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
37
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 4-1
One logical partition with a size of 500 MB, an ext3 file system, and a mount
point of /apps.
One logical partition with a size of 1 GB, a BtrFS file system, and a mount point
of /srv.
In the second part of this exercise, you use fdisk to create the following partitions:
One logical partition of the partition type Win95/FAT32 with a size of 500 MB.
One logical partition of the partition type Linux with a size of 500 MB.
In the third part of this exercise, you create file systems on the partitions you created
in the second part using the applicable options for mkfs:
Part III: Manage File Systems from the Command Line on page 42
2.
3.
Open a terminal window and use the su - command to switch to your root
account using a password of novell.
4.
5.
6.
38
b.
c.
For the New Partition Type, select Extended Partition; then click Next.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
d.
7.
Click Add.
The Add Partition on /dev/sda dialog is displayed.
b.
c.
d.
e.
f.
g.
8.
b.
With Custom Size selected, enter 1 GB in the Size field, then click Next.
c.
d.
e.
f.
g.
h.
i.
In the New Subvolume field enter @/www and click Add new.
In the New Subvolume field enter @/ftp and click Add new.
Click OK to close the Subvolume Handling dialog.
j.
9.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
39
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
10.
Select Finish.
This commits the changes to disk and closes the Expert Partitioner dialog.
11.
In the terminal window where you are logged in as root, verify that the new
partitions have been mounted by entering mount.
You should see the following lines:
/dev/sda5 on /apps type ext3 (rw,acl,user_xattr)
/dev/sda6 on /srv type btrfs (rw)
12.
b.
c.
d.
e.
Umount /mnt and mount /dev/sda6 again, using the entries in /etc/
fstab
umount /mnt
mount -a
f.
Verify that the files you moved are available again under /srv/www by
entering
ls
13.
/srv/www
Verify that the appropriate entry was added to the /etc/fstab for the new
partitions by entering:
cat /etc/fstab
In the terminal window where you are logged in as root, start the utility fdisk
to modify the first hard disk on your server by entering
fdisk /dev/sda
2.
40
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Start
2048
2105344
14684160
14686208
15730688
End
2105343
14684159
20971519
15728639
17831935
Blocks
1051648
6289408
3143680
521216
1050624
Id
82
83
f
83
83
System
Linux s
Linux
W95 Ex
Linux
Linux
Create a new 500MB Win95 FAT32 logical partition in the extended partition
you created earlier by doing the following:
a.
b.
c.
d.
e.
f.
g.
h.
4.
Create another logical partitions with a partition type of Linux (the default) by
doing the following:
a.
b.
c.
d.
e.
5.
Write the new partition table to your hard drive and exit fdisk by entering w.
6.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
41
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
7.
8.
To access the new partitions, you must update the kernels partition table stored
in memory. Do one of the following:
In the terminal window where you are logged in as root, create the following file
systems:
a.
Create a new FAT32 file system on /dev/sda7 and give it the label data1
by entering the following:
mkfs.msdos
-n
data1
/dev/sda7
2.
Create the directories named data1 and data2 under /export/ by entering
mkdir -p /export/data{1,2}
3.
4.
As root, add entries to the /etc/fstab file for the new file systems:
a.
b.
Press Ins.
c.
At the end of the file fstab, add the following new lines:
/dev/sda7
/dev/sda8
42
/export/data1
/export/data2
vfat
ext2
defaults
defaults
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
1 2
1 2
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
These new entries ensure the sda7 and sda8 partitions are mounted when
starting or rebooting the system.
d.
5.
Save the changes to /etc/fstab by pressing Esc and then entering :wq.
In the terminal window, reread the /etc/fstab file and mount all of the new
file systems by entering
mount -a
6.
View the information on the mounted file systems by entering the following two
commands:
mount
cat /proc/mounts
You should see entries for the two new partitions you just created.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
43
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 4-2
2.
3.
Open a terminal session and switch to your root user account by entering su followed by a password of novell at the shell prompt.
4.
5.
6.
7.
8.
In the terminal window, umount the /dev/sda8 partition and view details
about the ext2 file system on it by entering
umount /dev/sda8
44
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
While the file system is unmounted, give the ext2 file system a volume name
of /export/data2 by entering
tune2fs -L /export/data2 /dev/sda8
NOTE: It is common practice to use this naming convention. Naming a file system after
its mount point can be useful in system rescue situations when the /etc/fstab file is
not available.
c.
Verify that the file system now has a volume name by entering
dumpe2fs /dev/sda8 | less
You should see that the Filesystem volume name has been set to the
partitions mount point, /export/data2.
d.
Add a journal to the file system (making it an ext3 file system) by entering
tune2fs -j /dev/sda8
e.
f.
g.
h.
i.
j.
Edit the /etc/fstab file to change the file system type from ext2 to ext3
by entering vi /etc/fstab at the shell prompt.
k.
Press Ins.
l.
Locate the entry for /dev/sda8 and change the file system type from ext2
to ext3, as in the following:
/dev/sda8
Version 1
/export/data2
ext3
defaults
1 2
m.
Press Esc, then enter :exit to save the changes to the file and exit the vi
editor.
n.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
45
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
mount -a
o.
p.
q.
r.
Verify that the file system is mounted without a journal (as an ext2 file
system) by entering
mount
As you can see, ext3 is backward compatible with ext2.
s.
2.
b.
c.
d.
e.
f.
46
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
47
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 4-3
Part I: Create LVM Physical Volumes, a Volume Group, and Logical Volumes
on page 48
2.
3.
Start YaST by selecting Computer > YaST and entering a password of novell,
when prompted.
4.
Select System > Partitioner and acknowledge the warning message by selecting
Yes.
The Expert Partitioner dialog appears.
5.
6.
b.
c.
d.
Click Next.
e.
f.
g.
7.
48
From the System View, select Volume Management; then click Add > Volume
Group.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
8.
9.
10.
Add each Linux LVM physical volume to the volume group projects by Ctrlclicking /dev/sda9 and /dev/sda10 and then clicking Add.
Click Finish.
The Volume Management dialog appears displaying the newly added volume
group.
11.
Add a logical volume named pilot to the projects volume group by doing the
following:
a.
With Volume Management selected in the System View, select Add >
LogicalVolume.
The Add Logical Volume dialog appears.
12.
b.
c.
Select Custom Size and enter 750 MB in the Size field, then click Next.
d.
e.
f.
Select Finish.
Add a logical volume named production to the projects volume group by doing
the following:
a.
With Volume Management selected in the System View, select Add >
LogicalVolume.
The Add Logical Volume dialog appears.
b.
c.
Select Custom Size and enter 750 MB in the Size field, then click Next.
d.
e.
f.
Select Finish.
You are returned to the Expert Partitioner.
13.
14.
Open a terminal window and use the su - command and a password of novell
to switch to root.
15.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
49
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
16.
2.
From the YaST Control Center, select System > Partitioner and acknowledge the
warning message by selecting Yes.
The Expert Partitioner dialog appears.
3.
4.
5.
6.
7.
Save the changes by clicking Next, then apply the changes by clicking Finish.
8.
From the terminal window, view the new size of production by entering
df -h
(End of Exercise)
50
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 4-4
2.
3.
Open a terminal window; then switch to root using the su - command and a
password of novell.
4.
5.
6.
7.
Add quota mount options to the /dev/sda8 partition by doing the following:
a.
b.
c.
d.
8.
ext3
1 2
When you finish, press Esc, then save the file and exit by entering :wq.
Remount the file system so it that the changes in the /etc/fstab file are read
by the system by entering
mount -o remount /dev/sda8
NOTE: If you receive the error message /export/data2 mounted already, or bad option, check
the contents of the /etc/fstab file. You might have misspelled the usrquota or
grpquota option.
9.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
51
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
10.
11.
Turn quotas on for all file systems that are mounted with these options by
entering
quotaon -av
12.
13.
Set a quota for geeko with a soft block limit of about 20 MB and a hard block
limit of about 30 MB on /dev/sda8 by entering
edquota -u geeko
The quota editor appears in the vi editor.
14.
Press Ins.
15.
16.
17.
18.
19.
(Optional) If you finish early, set a quota for the users group of 100 MB for the
soft limit and 150 MB for the hard limit.
20.
b.
21.
(End of Exercise)
52
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
SECTION 5
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
53
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 5-1
Part II: Delete the Current Network Setup with YaST on page 54
If necessary, power on your da1 virtual server and log in as geeko with a
password of novell.
2.
3.
4.
Under eth0, find the line starting with inet and record the IP address with the
subnet mask displayed in that line:
5.
IP address:
Subnet mask:
6.
7.
Find the line starting with link/ether and record the MAC address of the
network card:
MAC address:
54
1.
2.
3.
Click OK.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
4.
Close YaST.
5.
Verify that the network connection is not working any more by pinging your host
systems vmnet1 virtual network interface. Enter the following at the shell
prompt:
ping 172.17.8.1
You should see a message indicating that the network is unreachable.
6.
2.
3.
4.
2.
Version 1
3.
Open the copied file in a text editor by entering vi ifcfg-eth0 at the shell
prompt.
4.
Press Ins.
5.
STARTMODE='auto'
BOOTPROTO='static'
IPADDR='172.17.8.101/16'
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
55
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
NETMASK=255.255.0.0
BROADCAST=172.17.255.255
6.
Press Esc, then save the file and exit vi by entering :wq.
7.
Create a new file with vi called routes by entering vi routes at the shell
prompt.
8.
9.
10.
172.17.8.1
Press Esc; then save the file and exit vi by entering :wq.
Reboot your system by entering init 6 at the shell prompt.
Wait while the system reboots.
11.
12.
13.
14.
Verify that the network configuration loaded correctly by entering the following
commands:
ip address show eth0
ip route show
15.
16.
NOTE: If the network configuration doesnt work properly, use the YaST Network Settings module
to reconfigure the network card with the proper settings.
(End of Exercise)
56
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Manage Hardware
SECTION 6
Manage Hardware
In this section of the workbook, you can find the following exercises:
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
57
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 6-1
If necessary, power on your da1 virtual server and log in as geeko with a
password of novell.
2.
Open a terminal window, then switch to the root user by entering su - followed
by a password of novell.
3.
View the currently loaded kernel modules by entering lsmod at the prompt.
4.
Scroll through the modules to see if the joystick module (joydev) is loaded. If its
difficult to locate in the output, you can enter lsmod | grep joydev at the
shell prompt.
The 0 in the Used column indicates that the module is not in use.
NOTE: If the joydev module is not listed, skip to step Step 7 on page 58.
5.
6.
Verify that the joydev kernel module was removed from memory by entering
lsmod | grep joydev at the shell prompt.
Notice that the module joydev is no longer listed.
7.
8.
Verify that the joydev kernel module is loaded in memory by entering lsmod |
grep joydev at the shell prompt.
9.
10.
11.
12.
13.
14.
15.
(End of Exercise)
58
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Manage Hardware
Exercise 6-2
If necessary, power on your da1 virtual server and log in as geeko with a
password of novell.
2.
3.
4.
5.
6.
b.
c.
d.
Click Save.
e.
Wait while the file is saved. This make take several minutes to complete.
7.
8.
9.
View the information saved in the hardware.txt file by doing the following:
10.
a.
b.
c.
d.
e.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
59
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 6-3
If necessary, power on your da1 virtual server and log in as geeko with a
password of novell.
2.
Open a terminal window and switch to the root user account by entering su followed by a password of novell.
3.
4.
5.
Press Ins.
6.
Locate and scroll down to the line that sets the name of your network interface to
eth0.
7.
8.
Press Esc.
9.
Save your changes and exit the editor by entering :exit at the shell prompt.
10.
Reboot your da1 virtual server by entering init 6 at the shell prompt.
11.
Wait for your default GRUB menu item to be selected to start the boot process.
12.
When the system starts to boot, press Esc so you can view your systems boot
messages.
You should see a message indicating eth0 is being renamed to eth1 by udev.
You should also see a message indicating the eth1 interface has not been
configured. This happens because there is no configuration for eth1 in /etc/
sysconfig/network/.
13.
As these messages may scroll by too fast to see them easily, you can find the
udev message by doing the following:
a.
When the system has rebooted, log in as geeko with a password of novell.
b.
c.
14.
15.
60
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Manage Hardware
Press Ins.
17.
18.
Press Esc.
19.
Save your changes and exit the editor by entering :exit at the shell prompt.
20.
Reboot your da1 virtual server by entering init 6 at the shell prompt.
21.
Wait for your default GRUB menu item to be selected to start the boot process.
22.
When the system starts to boot, press Esc so you can view your systems boot
messages.
23.
Verify that your network interface is now named eth0 and that the appropriate
network configuration parameters are applied.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
61
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
62
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
SECTION 7
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
63
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 7-1
Remotely execute the ps aux command on da1 without logging in to the server.
Copy the /etc/hosts file from your da-host workstation to the home
directory of geeko on da1.
Using sftp, copy the /bin/date file from da1 to /home/geeko on your
workstation.
Do the following:
1.
2.
b.
c.
d.
e.
3.
Check the processes running on the da1 server by entering the following at the
shell prompt of your da-host workstation:
ssh -l geeko da1.digitalairlines.com ps aux
4.
5.
Copy the /etc/hosts file on your da1 server to the /tmp directory on your
workstation by entering the following at the workstation shell prompt:
scp geeko@da1.digitalairlines.com:/etc/hosts /tmp/
6.
7.
8.
64
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
b.
c.
d.
11.
12.
13.
Copy the /bin/date program file from the da1 server to geekos home
directory on your workstation by entering:
get /bin/date /home/geeko/
14.
15.
16.
Close all open windows on your da-host workstation and your da1 virtual
machine.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
65
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 7-2
2.
3.
b.
c.
4.
Add the RSA public key to the geeko users ~/.ssh/authorized_keys file
on da1 by doing the following:
a.
Copy the file to the home directory of geeko on the da1 server by entering
the following:
scp ~/.ssh/id_rsa.pub
geeko@da1.digitalairlines.com:
b.
c.
d.
e.
Enter ls -al.
f.
g.
66
5.
6.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
8.
9.
10.
11.
12.
13.
14.
Do the following:
a.
b.
c.
d.
Press Ins.
e.
f.
Press Esc.
g.
15.
16.
17.
18.
Using the vi editor, undo the changes made in Step 14 on page 67; then restart
sshd.
19.
20.
21.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
67
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 7-3
2.
3.
4.
5.
6.
2.
68
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
3.
In the main window of YaST, select Network Services > Remote Administration
(VNC).
The Remote Administration dialog appears.
2.
Select Allow Remote Administration and select Open Port in Firewall if the
firewall is enabled.
3.
Click Finish.
4.
Close YaST.
5.
Restart the display manager by entering rcxdm restart at the shell prompt.
where you are logged in to da1 via ssh.
You should see the graphical interface of your da1 virtual machine restart.
6.
b.
c.
d.
Click Accept.
e.
f.
Close YaST.
2.
On your da-host workstation desktop, open the Firefox web browser by selecting
Computer > Firefox.
3.
4.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
69
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
6.
When youre finish testing the desktop, close the VNC session by clicking
Disconnect (at the top of the screen).
7.
(End of Exercise)
70
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 7-4
Use Nomad
In this exercise, you configure remote desktop sharing using Nomad. You establish an
RDP connection between da-host and da1.
As the necessary client packages are part of the SLED 11 SP2 installation media, you
have to add the DVD as a repository to da-host before installation.
You establish an RDP connection between your da-host workstation and the da1
virtual workstation.
Complete the following:
1.
2.
Log in to your da1 virtual machine as geeko, open a terminal window and su to the root account (password novell).
3.
4.
Start YaST and select Network Services > Remote Administration (RDP).
b.
When prompted that the xrdp package needs to be installed, click Install.
c.
d.
e.
Mark Allow Remote Administration and Open Port in Firewall if the firewall
is activated
f.
Click Finish.
g.
Close YaST.
5.
6.
7.
Open a terminal session and switch to root using the su- command followed by
a password of novell.
8.
Verify that xrdp is running by entering rcxrdp status at the shell prompt.
The command should return a status of running.
9.
Version 1
Install the rdesktop and tsclient packages on your host workstation by doing the
following:
a.
b.
c.
d.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
71
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
10.
e.
Select Add > DVD > Next; when prompted to insert the Add-on Products
DVD select Continue.
f.
g.
h.
i.
j.
Within the search results, select the rdesktop and tsclient packages and click
Accept. In the Automatic Changes dialog, select Continue.
k.
b.
In the Termina Server Client window, dlick New Connection > Windows
Terminal Service.
An Windows Terminal Service connection dialog appears.
c.
d.
e.
f.
g.
h.
i.
j.
Click Save.
The da1 Desktop remote desktop connection is added to the Terminal Server
Client window.
11.
12.
(Conditional) If time permits, experiment with the remote desktop. Try opening
and using the various applications remotely.
13.
When complete, click Computer > Logout > Log Out within the remote desktop
session.
14.
15.
(End of Exercise)
72
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
SECTION 8
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
73
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 8-1
Table 8-1
Hardware Values
System Parameter
Value
OS
Hardware Architecture
Processor Type
Hostname
Kernel Release
Kernel Version (include date and time)
System Up Time
Load Averages
SLES 11 Version
System Date and Time
Model Name of Processor
Free Memory
Patch Level
If necessary, power on your da1 server and log in as geeko with a password of
novell.
2.
Open a terminal window and switch to root using the su - command and a
password of novell.
3.
View the kernel release of the Linux distribution you are running by entering
uname -r
4.
5.
6.
74
View all information, including hostname, kernel release, and kernel version, by
entering
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
uname -a
7.
8.
View the version of the SUSE Linux Enterprise Server distribution by entering
cat /etc/SuSE-release
9.
10.
11.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
75
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 8-2
Logs the date in the local4.info file each time a new log file is generated
NOTE: The above values (one day, five logs, 20 bytes) are used for demonstration purposes only. In
a production environment, these values should be much higher.
If necessary, power on your da1 server and log in as geeko with a password of
novell.
2.
Open a terminal window and switch to root using the su - command and a
password of novell.
3.
4.
Press Ins.
5.
Add the following lines at the bottom of the file to create filters for the messages
you want to log:
6.
76
filter f_local4debug
};
{ level(debug)
and facility(local4);
filter f_local4info
{ level(info)
filter f_local4
{ facility(local4); };
and facility(local4); };
Specify the destinations and log paths by adding the following lines:
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Save the changes and close the editor by pressing Esc and then entering :exit.
8.
9.
10.
Check the configuration by logging an entry to the info level in the local4 facility
by doing the following:
a.
Enter the following in one of your terminal sessions to monitor the activity
of the log file:
tail -F /var/log/local4.info
NOTE: The -F option keeps trying to open a file even if it is inaccessible when tail
starts.
You will see warnings regarding the fact that the file does not yet exist. You can disregard
this error as the file will be created when you complete the next step.
b.
In the other terminal window, log an entry to the info level in the local4
facility by entering
logger -p local4.info "Info message 1"
c.
Check the results in the second terminal window. The message should be
logged in the /var/log/local4.info file.
The message should also be logged in the /var/log/local4 file and,
because of other entries in /etc/syslog-ng/syslog-ng.conf, in /
var/log/localmessages.
NOTE: If no messages appear, there might be something wrong with your syslog
configuration, for instance a typo or a missing ;. To diagnose what is wrong, enter
rcsyslog restart at the shell prompt and see if syslog starts properly. If there is an
issue with the configuration, an error message will say so. Look for the line number
shown in the output for the error, correct it, and restart syslog.
d.
Version 1
In the terminal window where the log activity is being monitored with
tail, stop the monitoring by pressing Ctrl+c.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
77
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
11.
Repeat this process for the debug log level. Use the following command in the
first terminal window:
tail -F /var/log/local4.debug
Use the following command in the second terminal window:
logger -p local4.debug Info message 2
NOTE: Only those level4 log files with entries will be compressed during log rotation in Part
II of this exercise.
12.
In the terminal window where the log activity is being monitored with tail,
stop the monitoring by pressing Ctrl+c.
2.
Press Ins.
3.
4.
Press Esc, then save the changes and close the editor by entering :exit.
5.
6.
7.
8.
Check the directory /var/log/ for the zipped local4 log files by entering
ls -l /var/log | less
You see the following files:
78
local4.debug-current_date.bz2
local4.info-current_date.bz2
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
For example, if the current date is July 15, 2012, then the zipped file for
local4.info will be local4.info-20120715.bz2.
The .bz2 extension is used because the command to compress files is set to
bzip2 in /etc/logrotate.conf.
NOTE: Only those log files with entries are zipped.
9.
10.
11.
Press q to exit.
12.
13.
14.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
79
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
80
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
SECTION 9
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
81
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 9-1
If necessary, power on your da1 server and log in as geeko with a password of
novell.
2.
Open a terminal window and switch to root using the su - command and a
password of novell.
3.
4.
5.
Display the current date and time by entering date at the shell prompt.
6.
Three minutes from now, log who is currently logged in to the /var/log/
messages file by entering the following commands:
status at the
at hh:mm
finger >> /var/log/messages
NOTE: Make sure you enter two > characters in the above command. If you have only one >
character, all existing entries in /var/log/messages will be overwritten.
7.
8.
9.
82
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Schedule the same job to run tomorrow at noon by entering the following
commands:
at noon tomorrow
finger >> /var/log/messages
11.
12.
13.
14.
15.
16.
At the shell prompt, return to the geeko user account by entering exit.
2.
b.
c.
Schedule finger to run every minute and write the output to the ~/
users.log file by entering the following:
*
finger
>>
~/users.log
d.
Press Esc.
e.
f.
Watch the users.log file for a few minutes and validate that it is being
updated by entering tail -F ~/users.log at the shell prompt.
NOTE: The -F option keeps trying to open a file even if it is inaccessible when tail
starts.
g.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
83
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
3.
4.
Verify that the crontab file no longer exists by entering crontab -l at the
shell prompt.
5.
Verify that the cron job you defined in Step 2 is no longer active by entering
tail -f ~/users.log at the shell prompt.
Notice that entries to users.log are no longer being added.
6.
7.
b.
c.
Press Ins.
d.
Add a job that runs at 2:00 a.m. every Tuesday and creates a tarball of /etc
that is saved in /tmp by entering the following:
0
e.
Press Esc.
f.
g.
Verify that the job is in the crontab file for root by entering crontab -l
at the shell prompt.
The entry you made in Step d should be listed.
8.
9.
10.
-l at the
(End of Exercise)
84
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
SECTION 10
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
85
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 10-1
If necessary, power on you da1 server and log in as geeko with a password of
novell.
2.
3.
4.
5.
6.
7.
8.
Click Next.
9.
In the Backup Options screen, use the default selections by clicking Next.
A list of directories and file systems which are not going to be included in the
backup is displayed.
10.
11.
12.
Click OK.
13.
In the profile overview, make sure the profile Course3116 is highlighted; then
click Create Backup.
Wait until the backup has been completed. (This will take some time to
complete.)
14.
In the Backup Summary, click OK; then click OK in the System Backup screen.
15.
Open a terminal window and switch to your root user account by entering su
- at the shell prompt followed by a password of novell.
b.
(End of Exercise)
86
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 10-2
NOTE: In this exercise, you copy backup files to the directory /tmp. This is done for
demonstration purposes only. You should not store an actual backup in the /tmp directory.
If necessary, power on your da1 server and log in as geeko with a password of
novell.
2.
3.
4.
5.
6.
7.
2.
3.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
87
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
5.
6.
7.
8.
(End of Exercise)
88
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 10-3
2.
3.
In the VMware Player window, select 3116-da2 and click Play virtual machine.
4.
5.
6.
Start YaST and create a tux user account using the Users and Groups
Management module.
7.
8.
In the Snapshots dialog, select the entry that matches the creation of the tux user
from Step 6 and click Show Changes.
9.
10.
Click the three Show the difference ... radio buttons to see their effect.
11.
12.
Click the three Show the difference ... radio buttons again and notice the
difference to what they showed in Step 10.
13.
With the passwd entry still selected, click Restore From Second and then OK.
14.
Select all entries (put a check mark in the square) and click Restore Selected.
15.
16.
Close YaST.
17.
18.
In the terminal window, enter snapper list. There should be a yast snapper
entry; this is the entry where you undid the yast users entry.
Note the Pre and Post numbers:
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
89
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
19.
Display the difference for the two snapshots for the /etc/passwd entry with the
following command:
snapper diff prenr..postnr /etc/passwd
There should be a line that starts with -tux ...
20.
21.
22.
Roll back the change made by the YaST Snapper module by entering
snapper -v undochange prenr..postnr
As no file name is specified, all files are restored.
This is not always advisable, as other files might have been changed by other
processes while the snapper module was running that you dont want to change
back to their previous state. Therefore always check the status as in Step 21 to
avoid any inadvertant effects from the restore.
23.
Check if the /home/tux directory was restored and the /etc/passwd file
has again an entry for tux.
(End of Exercise)
90
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 10-4
Connect your da1 virtual machine to the 3116_CD.iso file located in the
Exercises/10-3 directory on your course DVD by doing the following:
a.
b.
In your da1 VMware window, select Virtual Machine > Removable Devices
> CD/DVD > Disconnect.
c.
If necessary, insert your 3116 course DVD in your host workstations optical
drive.
d.
In your da1 VMware window, select Virtual Machine > Removable Devices
> CD/DVD > Connect to Disk Image File (iso).
e.
Browse to and select the 3116_CD.iso file located in the Exercises/103 directory on your course DVD.
f.
Select Open.
g.
2.
3.
4.
5.
6.
Note the corresponding device name (listed in the first column of the output):
7.
Copy an image of the CD to the hard disk by entering the following at the shell
prompt:
dd if=/dev/device_name of=/tmp/course_cd.iso
When done, you should see a ... records in ... records out message.
8.
When the copy process is complete, mount the image file by entering
mount -o loop /tmp/course_cd.iso /mnt/
9.
10.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
91
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
11.
12.
Change to your home directory and unmount the image file by entering the
following commands:
cd
umount /mnt
13.
14.
Connect your da1 virtual machine back to your host workstations optical drive
by doing the following:
a.
b.
In your da1 VMware window, select Virtual Machine > Removable Devices
> CD/DVD > Disconnect.
c.
d.
In your da1 VMware window, select Virtual Machine > Removable Devices
> CD/DVD > Connect to /dev/sr0.
e.
f.
(End of Exercise)
92
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 10-5
On your da1 virtual server, log in as geeko with a password of novell (if
necessary) and open a terminal window.
2.
3.
4.
Copy geeko's home directory to the backup directory by entering the following
command at the shell prompt:
rsync -av /home/geeko/ /tmp/rsync_test
5.
6.
7.
8.
9.
As the geeko user, create a new file by entering touch new_file at the shell
prompt.
10.
Switch to the root terminal window and enter the same rsync command again:
rsync -av /home/geeko/ /tmp/rsync_test
Notice that rsync transfers only the new file and the corresponding directory.
Open the ssh port in the firewall on da-host (if it is enabled) by doing the
following:
a.
b.
c.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
93
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
d.
e.
Click Add.
f.
g.
Close YaST.
2.
3.
4.
From the root terminal window on da1, perform a remote backup of the geeko
users home directory on da-host by entering the following at the shell prompt
(all on one line):
rsync -av root@da-host.digitalairlines.com:/home/geeko
/tmp/rsync_test
5.
6.
7.
b.
8.
9.
10.
11.
12.
(End of Exercise)
94
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 10-6
On your da1 virtual server, log in as geeko with a password of novell (if
necessary) and open a terminal window.
2.
3.
4.
5.
/tmp/rsync_test
6.
Press Esc, then enter :exit to save the file and close the editor.
7.
8.
9.
-e at the
/usr/local/bin/
For example, to have the backup script run at 3:30 pm, you would enter the
following:
30 15 *
/usr/local/bin/home_backup.sh
10.
Press Esc, then enter :exit to save the file and close the editor.
11.
Wait five minutes, then verify that the backup ran by entering the following at the
shell prompt:
ls /tmp/rsync_test
12.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
95
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
96
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
SECTION 11
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
97
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 11-1
If necessary, power on your da1 server and log in as geeko with a password of
novell.
2.
3.
4.
Create the /etc/nologin file by entering the following command at the shell
prompt:
echo No login possible > /etc/nologin
5.
6.
7.
8.
View the last lines of the file /var/log/messages by entering the following
at the shell prompt:
tail /var/log/messages
Look for the FAILED LOGIN message for geeko that indicates the failed login
attempt.
9.
b.
c.
requisite
pam_nologin.so
98
b.
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
You are able to log in because PAM no longer checks for the /etc/
nologin file.
c.
11.
b.
c.
d.
12.
requisite
pam_nologin.so
Press Esc, then save the file and exit vi by entering :wq.
13.
Press Alt+F3.
14.
15.
Press Alt+F4.
16.
Because the /etc/nologin file no longer exists, user login is enabled again.
17.
18.
Press Alt+F3.
19.
20.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
99
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 11-2
Configure sudo
In this exercise, you practice configuring sudo.
You allow the geeko user to kill processes on da1 as root.
Complete the following:
1.
2.
3.
4.
5.
Press Ins.
6.
7.
Comment out the following lines by placing a # at the beginning of each of the
following lines:
Defaults targetpw
ALL
8.
ALL=(ALL) ALL
Define a Host_Alias named HOSTS that contains the da1 host by adding the
following line to the end of the file:
Host_Alias
11.
POWERUSERS = geeko
Define a Cmnd_Alias named KPROCS that contains the kill and killall
commands by adding the following line to the end of the file:
Cmnd_Alias
10.
9.
HOSTS = da1
Using the aliases defined above, allow the geeko user to run the specified
commands on da1 as root by adding the following line to the end of the file:
POWERUSERS HOSTS = (root) KPROCS
12.
Press Esc, then save your changes and exit the editor by entering :exit.
13.
At the shell prompt (as root), enter top to start the top process running.
b.
c.
At the shell prompt in the new terminal window (as geeko), enter sudo
killall top.
d.
e.
100
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
101
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 11-3
If necessary, power on your da1 virtual server and log in as geeko with a
password of novell.
2.
3.
Check the setting for the Ctrl+Alt+Del keystroke in the file /etc/inittab by
entering
grep ctrlaltdel /etc/inittab
Note the current setting:
4.
Start YaST by selecting Computer > YaST and entering a password of novell.
5.
6.
7.
8.
9.
10.
11.
From the Interpretation of Ctrl + Alt + Del drop-down list, select Halt.
12.
13.
Close YaST.
14.
To test the change, you must first activate the new configuration.
This can be done either by rebooting the system or by entering (as root) init q,
which reloads the /etc/inittab file. You will do the latter:
15.
a.
b.
102
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
16.
17.
Power the da1 virtual machine back on and log in as geeko with a password of
novell.
18.
(Optional) Use the YaST Security Settings module to change the default for
Ctrl+Alt+Del back to Restart.
(End of Exercise)
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
103
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 11-4
Use ACLs
In this exercise, you practice using ACLs.
In the first part, you create the acl_test directory in /tmp and set rwx rights for
the owner only. You then set ACLs to allow the geeko user to change into that
directory.
In the second part, you create a file in the /tmp/acl_test directory as root using
touch. Then you change the default ACLs for the /tmp/acl_test directory to
give geeko read and write access to files and directories.
In the third part of this exercise, you practice removing the ACLs that you have set.
Complete the following:
2.
3.
4.
5.
6.
7.
8.
9.
10.
104
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Switch to the geeko terminal and try to access the directory again by entering
cd /tmp/acl_test
Because of the extended ACL, you can now change into the directory.
12.
Switch to the root terminal and display the extended ACL of the directory by
entering
getfacl /tmp/acl_test/
It should show the additional permissions for the named user geeko.
2.
3.
4.
5.
6.
2.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
105
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
3.
4.
5.
6.
(End of Exercise)
106
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
Exercise 11-5
Configure SuSEfirewall2
In this exercise, you practice configuring the firewall on SUSE Linux Enterprise
Server 11 SP2.
In this exercise, you practice configuring SuSEfirewall2 on your da1 server. You
install and configure the Apache Web Server on da1. Then you enable the firewall on
da1 and configure it to allow Web server traffic.
Complete the following:
1.
2.
b.
c.
d.
e.
f.
Click Accept.
g.
h.
If prompted, insert your SLES 11 SP2 installation DVD and click Retry.
Wait while the packages are installed.
3.
i.
j.
k.
l.
b.
c.
4.
Close Firefox.
b.
c.
In the Start-Up screen, verify that mark Enable Firewall Automatic Starting
is marked.
d.
Version 1
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
107
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.
5.
e.
Click Next.
f.
g.
Close YaST.
Test the firewall configuration from your da-host workstation by doing the
following:
a.
b.
6.
7.
Configure the firewall on DA1 to allow Web server traffic by doing the
following:
a.
b.
c.
d.
From the Service to Allow drop-down list, select HTTP Server; then click
Add.
e.
From the Service to Allow drop-down list, select HTTPS Server; then click
Add.
f.
Click Next.
g.
Click Finish.
h.
Close YaST.
b.
8.
(End of Exercise)
108
Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES.
Version 1
Novell, Inc. Copyright 2012-1-HARDCOPY PERMITTED. NO OTHER PRINTING, COPYING, OR DISTRIBUTION ALLOWED.