Professional Documents
Culture Documents
Administration
Workbook
Novell Training Services w w w. n o v e l l . c o m
COU RSE 3072
AUTHORIZED COURSEWA RE
Part # 100-005099-001
Version 2
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Proprietary Statement Trademarks
Copyright © 2007 Novell, Inc. All rights reserved. Novell, Inc. has attempted to supply trademark information about
No part of this publication may be reproduced, photocopied, stored company names, products, and services mentioned in this manual.
on a retrieval system, or transmitted without the express prior The following list of trademarks was derived from various sources.
consent of the publisher. This manual, and any portion thereof, may
not be copied without the express written permission of Novell, Inc. Novell, Inc. Trademarks
Novell, the Novell logo, NetWare, BorderManager, ConsoleOne,
Novell, Inc.
DirXML, GroupWise, iChain, ManageWise, NDPS, NDS, NetMail,
1800 South Novell Place
Novell Directory Services, Novell iFolder, Novell SecretStore,
Provo, UT 84606-2399
Ximian, Ximian Evolution and ZENworks are registered
trademarks; CDE, Certified Directory Engineer and CNE are
Disclaimer registered service marks; eDirectory, Evolution, exteNd, exteNd
Novell, Inc. makes no representations or warranties with respect to Composer, exteNd Directory, exteNd Workbench, Mono, NIMS,
the contents or use of this manual, and specifically disclaims any NLM, NMAS, Novell Certificate Server, Novell Client, Novell
express or implied warranties of merchantability or fitness for any Cluster Services, Novell Distributed Print Services, Novell Internet
particular purpose. Messaging System, Novell Storage Services, Nsure, Nsure
Further, Novell, Inc. reserves the right to revise this publication and Resources, Nterprise, Nterprise Branch Office, Red Carpet and Red
to make changes in its content at any time, without obligation to Carpet Enterprise are trademarks; and Certified Novell
notify any person or entity of such revisions or changes. Administrator, CNA, Certified Novell Engineer, Certified Novell
Further, Novell, Inc. makes no representations or warranties with Instructor, CNI, Master CNE, Master CNI, MCNE, MCNI, Novell
respect to any NetWare software, and specifically disclaims any Education Academic Partner, NEAP, Ngage, Novell Online
express or implied warranties of merchantability or fitness for any Training Provider, NOTP and Novell Technical Services are service
particular purpose. marks of Novell, Inc. in the United States and other countries. SUSE
Further, Novell, Inc. reserves the right to make changes to any and is a registered trademark of SUSE LINUX AG, a Novell company.
all parts of NetWare software at any time, without obligation to For more information on Novell trademarks, please visit
notify any person or entity of such changes. http://www.novell.com/company/legal/trademarks/tmlist.html.
This Novell Training Manual is published solely to instruct students
Other Trademarks
in the use of Novell networking software. Although third-party
Adaptec is a registered trademark of Adaptec, Inc. AMD is a
application software packages are used in Novell training courses,
trademark of Advanced Micro Devices. AppleShare and AppleTalk
this is for demonstration purposes only and shall not constitute an
are registered trademarks of Apple Computer, Inc. ARCserv is a
endorsement of any of these software applications.
registered trademark of Cheyenne Software, Inc. Btrieve is a
Further, Novell, Inc. does not represent itself as having any registered trademark of Pervasive Software, Inc. EtherTalk is a
particular expertise in these application software packages and any registered trademark of Apple Computer, Inc. Java is a trademark or
use by students of the same shall be done at the students’ own risk. registered trademark of Sun Microsystems, Inc. in the United States
and other countries. Linux is a registered trademark of Linus
Software Piracy Torvalds. LocalTalk is a registered trademark of Apple Computer,
Throughout the world, unauthorized duplication of software is Inc. Lotus Notes is a registered trademark of Lotus Development
subject to both criminal and civil penalties. Corporation. Macintosh is a registered trademark of Apple
Computer, Inc. Netscape Communicator is a trademark of Netscape
If you know of illegal copying of software, contact your local
Communications Corporation. Netscape Navigator is a registered
Software Antipiracy Hotline.
trademark of Netscape Communications Corporation. Pentium is a
For the Hotline number for your area, access Novell’s World Wide
registered trademark of Intel Corporation. Solaris is a registered
Web page at http://www.novell.com and look for the piracy page
trademark of Sun Microsystems, Inc. The Norton AntiVirus is a
under “Programs.”
trademark of Symantec Corporation. TokenTalk is a registered
Or, contact Novell’s anti-piracy headquarters in the U.S. at 800- trademark of Apple Computer, Inc. Tru64 is a trademark of Digital
PIRATES (747-2837) or 801-861-7101. Equipment Corp. UnitedLinux is a registered trademark of
UnitedLinux. UNIX is a registered trademark of the Open Group.
WebSphere is a trademark of International Business Machines
Corporation. Windows and Windows NT are registered trademarks
of Microsoft Corporation.
Contents
Introduction
Course Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-2
Exercise Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intro-3
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB TOC-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
WB TOC-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Contents
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB TOC-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
WB TOC-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Introduction
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Introduction
Before starting the exercises in this workbook, you need review the
following:
■ Course Scenario
■ Exercise Conventions
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB Intro-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Course Scenario
The IT department of Digital Airlines is rolling out more and more
SUSE Linux Enterprise Server 10 installations. Your task is to
familiarize yourself with SLES 10 to be able to take on more and
more system administrator tasks on this platform.
You decide to set up test servers in the lab to enhance your skills in
these areas.
WB Intro-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Introduction
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise Conventions
When working through an exercise, you will see conventions that
indicate information you need to enter that is specific to your server.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB Intro-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
WB Intro-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Install SUSE Linux Enterprise Server 10
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 1-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 1-1 Install SUSE Linux Enterprise Server 10
In this exercise, you install SUSE Linux Enterprise Server 10. Use
the following specifications as a guideline:
■ One partition with 1 GB for swap.
■ One partition with 6 GB for / (there should be space left on the
hard disk to add partitions in later exercises).
■ Use default software patterns; add the C/C++ Compiler and
Tools pattern.
■ root password: novell
(As novell is, of course, not adequate as a root password in
production, you could use a different one; however, the
exercises in this manual refers to novell as the root password.)
■ Use a fixed IP address; the instructor will let you know which
one to use:
❑ IP address:
❑ Network mask: 255.255.255.0
❑ Host name:
❑ Domain name: digitalairlines.com
❑ Name server: 10.0.0.254
❑ Default gateway: 10.0.0.254
(If you are doing this exercise in self-study with no other
students in the network, use 10.0.0.10 as IP address and da10 as
hostname.)
■ Use local authentication; create a user account geeko with a
password of novell.
■ Skip the online update.
WB 1-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Install SUSE Linux Enterprise Server 10
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Detailed Steps to Complete this Exercise:
x Although you can select any available language, the exercises in this
manual are written for English US.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 1-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
9. Select UTC and adjust the time to your current time, if needed.
When done, select Next. An Installation Settings proposal
dialog appears.
10. Select Keyboard Layout; Select your keyboard layout; then
select Accept.
You are returned to the Installation Proposal dialog.
WB 1-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Install SUSE Linux Enterprise Server 10
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
6. Create the root partition:
a. Select the same hard disk you used for the swap partition;
then select Create.
b. Select Primary Partition; then select OK.
c. In the End field of the size settings, enter +6GB.
d. Make sure that the following options are set:
❑ Reiser should be selected from the File system
drop-down list.
❑ / should be selected from the Mount Point
drop-down list.
e. Add the root partition by selecting OK.
7. Confirm the partitioning setup and return to the installation
proposal by selecting Finish.
8. From the Installation Settings Overview, select Software.
9. Select C/C++ Compiler and Tools in the list of patterns to the
left; then select Accept.
10. From the Installation Settings Overview, select Accept.
12. (Conditional) If you are usinge the CD set instead of the DVD,
YaST asks you to change CDs during the installation process and
the server might reboot when the software from the first CD is
installed.
Insert the requested CDs and select OK.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 1-5
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part III: Configure the Installed Server
WB 1-6 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Install SUSE Linux Enterprise Server 10
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
e. Return to the Network setup dialog by selecting OK.
14. Configure routing:
a. Select Routing.
b. In the Default Gateway field, enter 10.0.0.254.
c. Return to the Network setup dialog by selecting OK.
15. Return to the Network Configuration dialog by selecting Next.
16. Continue with the installation by selecting Next; then select Next
once more.
17. From the Test Internet Connection dialog, select No, Skip This
Test; then select Next.
18. From the Service Configuration dialog, accept the default
settings by selecting Next.
19. For the User Authentication Method, select Local (/etc/passwd);
then select Next.
20. Add a user:
a. User’s Full Name: Geeko Novell
b. User Login: geeko
c. Password: novell
d. Confirm password: novell
e. Create the user by selecting Next; confirm the password
warnings by selecting Yes.
21. From the Release Notes dialog, select Next.
(End of Exercise)
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 1-7
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
WB 1-8 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer the Linux File System
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 2-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 2-1 Configure Partitions on your Hard Drive
In the first part of this exercise, use YaST to create the following
partitions and file systems:
■ An extended partition using the remaining disk space.
■ One logical partition with a size of 500 MB, an ext2 file
system, and a mount point of /apps.
■ One logical partition with a size of 1 GB, a Reiser file system,
and a mount point of /srv.
In the second part of this exercise, use fdisk to create the following
partitions:
■ One partition of the partition type Win95/FAT32 with a size of
500 MB
■ Two partitions with the partition type Linux and a size of 1 GB
and 2 GB, respectively
x After this exercise, there should still be space left on the hard disk to create
additional partitions. If disk space is limited, use smaller values for the
partitions than those given here to make sure there is empty space for later
exercises.
In the third part, create file systems on the partitions you created in
Part II using the applicable options for mkfs:
■ Create a FAT32 file system on /dev/hda7 (or /dev/sda7,
depending on your hardware).
■ Create an ext2 file system on /dev/hda8 (or /dev/sda8,
depending on your hardware).
■ Create a Reiser file system with a file system size of 625 MB
on /dev/hda9 (or /dev/sda9, depending on your hardware).
WB 2-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer the Linux File System
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Detailed Steps to Complete this Exercise:
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 2-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
c. When you finish, confirm the partition definition by
selecting OK.
You are returned to the Expert Partitioner dialog where the
new partition is added to the list.
The asterisk (*) after the mount point signifies that the file
system is not mounted right now (see explanation in the
help text to the left).
5. Create a partition for the directory /srv:
a. Select the same hard disk as before; then select Create.
b. Configure a new logical partition by entering or selecting the
following:
❑ File system: Reiser
❑ End (cylinder): +1G
❑ Mount Point: /srv
c. Add the /srv partition by selecting OK.
You are returned to the Expert Partitioner dialog where the
new partition is added to the list.
6. Add the new partitions to the hard drive by selecting Apply.
A dialog appears asking if you really want to execute the
changes.
Select Finish.
This executes the changes and closes the Expert Partitioner
dialog. If you select Apply instead of Finish, the changes are
executed and you are returned to the Expert Partitioner dialog.
7. Verify creation of the new partition for /apps:
a. In the terminal window where you are logged in as root,
verify that the new partition is mounted by entering mount.
You should see the following line:
/dev/hda5 on /apps type ext2 (rw)
WB 2-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer the Linux File System
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
b. Verify that the appropriate entry was added to the /etc/fstab
for the new partition by entering the following:
cat /etc/fstab
You should see the following:
/dev/hda5 /apps ext2 acl,user_xattr 1 2
This entry makes sure that when the system boots, the new
file system is mounted.
8. The current content of the directory /srv is no longer visible, as it
is used as mount point for the partition /dev/hda6 (or /dev/sda6,
depending on your hardware). To copy the content to the new
partition, do the following:
a. Unmount /dev/hda6 (or /dev/sda6, depending on your
hardware) by entering
umount /srv
b. Mount the partition /dev/hda6 (or /dev/sda6, depending on
your hardware) under /mnt by entering
mount /dev/hda6 /mnt
c. Move the content of /srv to /mnt :
mv /srv/* /mnt
d. Umount /mnt and mount /dev/hda6 (or /dev/sda6, depending
on your hardware) again, using the entries in /etc/fstab:
umount /mnt
mount -a
e. Verify that the files you moved are available again under /srv
by entering
ls /srv/
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 2-5
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part II: Partition Manually with fdisk
WB 2-6 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer the Linux File System
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
4. Create 2 more logical partitions with the partition type of Linux
(the default) by doing the following:
a. Create a new partition by entering n; enter l (lower case L);
then accept the default first cylinder by pressing Enter.
b. Indicate the partition size by entering +1G.
c. Create a new partition by entering n; enter l (lower case L);
then accept the default first cylinder by pressing Enter.
d. Indicate the partition size by entering +2G.
e. Verify the new partition configuration by entering p.
Notice that 2 new partitions have been added to the
partition table.
5. Write the new partition table to your hard drive and exit fdisk by
entering w.
6. View the current partition table used by the kernel by entering
cat /proc/partitions
7. To be able to access the new partitions, the kernel has to update
its partition table stored in memory. Do one of the following:
❑ Reboot the system by entering reboot.
❑ Have the kernel update its partition table by entering
partprobe.
8. View again the partition table used by the kernel by entering
cat /proc/partitions
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 2-7
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part III: Manage File Systems from the Command Line
WB 2-8 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer the Linux File System
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
4. Verify that the directories were created by entering
ls -l /export
5. As root, using an editor of your choice, for instance vi in a
terminal window, add entries to the file /etc/fstab for the new file
systems:
a. Open the file /etc/fstab in an editor.
b. At the end of the file fstab, add the following entries:
/dev/hda7 /export/data1 vfat defaults 1 2
/dev/hda8 /export/data2 ext2 defaults 1 2
/dev/hda9 /export/data3 reiserfs defaults 1 2
You must include an empty line at the end of the file,
otherwise the mount command cannot read the file.
These entries make sure that the hda7, hda8, and hda9
partitions are mounted when starting or rebooting the
system.
c. When you finish, save /etc/fstab (when using vi, press Esc,
then enter :wq).
6. From the terminal window, mount all of the new file systems and
re-read the /etc/fstab file by entering
mount -a
7. View the information on the mounted file systems by entering the
following two commands:
mount
cat /proc/mounts
(End of Exercise)
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 2-9
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 2-2 Manage File Systems from the Command Line
In the first part of this exercise, run e2fsck on the ext2 file system
you created on /dev/hda5, which is mounted on /apps.
Then, resize the Reiser file system on /dev/hda9 to use the entire
partition and not just 625 MB.
WB 2-10 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer the Linux File System
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
3. Start a file system check on hda5 running in verbose mode with
an automatic response of yes to prompts by entering
e2fsck -f -y -v /dev/hda5
4. Mount the /apps file system again by entering
mount /apps
5. Verify that the file system is mounted by entering
mount
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 2-11
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
f. Mount /dev/hda8 again by entering
mount /dev/hda8
g. View information on the mounted file systems by entering
mount
Notice that the file system is still mounted as an ext2 file
system.
h. Unmount the partition /dev/hda8 again by entering
umount /dev/hda8
i. Verify that the file system state is clean by entering
dumpe2fs /dev/hda8 | less
j. Edit the file /etc/fstab to change the file system type from
ext2 to ext3, as in the following:
/dev/hda8 /export/data2 ext3 defaults 1 2
Save the file.
k. From the command line, re-read /etc/fstab and mount the
partition as an ext3 file system by entering
mount -a
l. Verify the change by entering
mount
m. Unmount the partition /dev/hda8 again by entering
umount /export/data2
n. Mount the partition as an ext2 file system manually by
entering
mount -t ext2 /dev/hda8 /export/data2
o. 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.
WB 2-12 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer the Linux File System
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
p. Remount /dev/hda8 as an ext3 file system and verify the
change by entering the following three commands:
umount /export/data2
mount -a
mount
2. Modify the partition /dev/hda9:
a. View the size of the partition /dev/hda9 by entering
df -h
b. Unmount dev/hda9 by entering
umount /export/data3
c. While the partition is unmounted, add a label to the file
system of /export/ data3 by entering
reiserfstune -l /export/data3 /dev/hda9
d. Resize the partition to consume the entire partition by
entering
resize_reiserfs /dev/hda9
When no size is specified, the file system is resized to use
all available space on the partition. Increasing the size of
the ReiserFS is also possible when the file system is
mounted.
e. Remount the partition by entering
mount -a
f. View the size of the partition by entering
df -h
The size is no longer 625 MB, but should be 1 GB or more
depending on the size of your partition.
g. Unmount the partition to run a file system check on it by
entering
umount /export/data3
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 2-13
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
h. Run a check on the file system on /dev/hda9 by entering
reiserfsck -y /dev/hda9
i. Remount all file systems by entering
mount -a
(End of Exercise)
WB 2-14 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer the Linux File System
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 2-3 Create Logical Volumes
In the first part of this exercise, use YaST to create two physical
volumes (PV) with a size of 1 GB each. Add them to a volume
group (VG) named projects. Within the volume group, add two
logical volumes named pilot (750MB) and production (750MB), to
be mounted under /projects/pilot and /projects/production,
respectively.
In the second part of the exercise, increase the size of the logical
volume production to the maximum space available within the
volume group.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 2-15
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
b. Select Do not Format; then select or enter the following:
❑ File system ID: 0x8E Linux LVM
❑ End (cylinder): +1GB
c. Save the partition definition by selecting OK.
3. Create another 1GB LVM partition by repeating step 2.
You should now have two 1GB LVM partitions.
4. Select LVM and enter the following in the Create a Volume
Group dialog:
❑ Volume Group Name: projects
❑ Physical Extent Size: 4M
5. Continue by selecting OK.
6. Add each Linux LVM physical volume to the volume group
projects by selecting each physical volume (such as /dev/hda10)
and then selecting Add Volume. Then select Next.
The Logical Volume Manager: Logical Volumes dialog appears.
7. Add a logical volume pilot within the projects volume group:
a. Select Add.
A Create Logical Volume dialog appears.
b. Enter or select the following:
❑ Format (file system): Reiser
❑ Logical volume name: pilot
❑ Size: 750 MB
❑ Mount Point: /projects/pilot
c. Save the logical volume definition by selecting OK.
8. Add a logical volume production within the projects volume
group:
a. Select Add.
A Create Logical Volume dialog appears.
WB 2-16 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer the Linux File System
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
b. Enter or select the following:
❑ Format (File system): Reiser
❑ Logical volume name: production
❑ Size: 750 MB
❑ Mount Point: /projects/production
c. Save the logical volume definition by selecting OK.
9. Save the changes by selecting Next.
You are returned to the Expert Partitioner.
10. In the Expert Partitioner, select Apply.
df -h
Notice the size of these new file systems.
13. View the device names and mount locations by entering
cat /etc/fstab
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 2-17
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
4. Continue by selecting OK.
5. Save the changes by selecting Finish; then confirm the
notification by selecting OK.
6. From the terminal window, view the new size of production by
entering
df -h
7. Close all open windows.
(End of Exercise)
WB 2-18 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer the Linux File System
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 2-4 Set up and Configure Disk Quotas
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 2-19
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
6. Run quotacheck to initialize the quota database by entering
quotacheck -mavug
You receive several status messages about old quota files.
These indicate that this is a new quota database with no
previous quota database files on the system.
7. Verify that the files aquota.user and aquota.groups exist in the
directory /export/data2 by entering
ls -l /export/data2
8. Turn quotas on for all file systems that are mounted with these
options by entering
quotaon -av
9. Make the quota system persistent after reboot by entering
insserv boot.quota
10. Set a quota for geeko with a soft limit of 20 MB and a hard limit
of 30 MB on /dev/hda8 by entering
edquota -u geeko
The quota editor appears (the vi editor).
11. Enter the required soft limit and hard limit under the Soft and
Hard columns for /dev/hda8 (press Insert twice to replace text).
The unit used is 1k. To create a limit of, for instance, 20 MB,
you would have to enter 20000.
12. When you finish, press Esc; then enter :wq.
13. Run repquota to view the quota information about all configured
users by entering
repquota -av
14. (Optional) If you finish early then set a quota for the users group
of 100 MB for the soft limit, and 150 MB for the hard limit.
WB 2-20 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer the Linux File System
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
15. Test if the quotas are enforced by doing the following:
a. As root, create a directory /export/data2/geeko and change
the owner to geeko by entering in a terminal window:
mkdir /export/data2/geeko
chown geeko.users /export/data2/geeko
b. Change to the user account geeko, and as geeko create a file
by entering
su - geeko
dd if=/dev/zero of=/export/data2/geeko/bigfile
After a short time, you should see a message:
Disk quota exceeded.
16. Close all open windows.
(End of Exercise)
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 2-21
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
WB 2-22 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer User Access and Security
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 3-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 3-1 Configure PAM Authentication
WB 3-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer User Access and Security
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
c. Add a # sign to the beginning of the following line, as in the
following:
#auth required pam_nologin.so
This PAM module is required to be successful during
system authentication. It checks to see if the file
/etc/nologin exists, and if it does, this PAM module does
not allow regular users to log in by returning a failed status.
Now that this line is commented out, PAM will not check
for the file. This means that all users can log in, even if the
file exists.
d. Return to the command mode by pressing Esc; save the file
by entering :w.
8. Test the modified PAM configuration file:
a. Switch to virtual console 4 (Alt+F4).
b. Attempt to log in as geeko (password novell).
You are able to log in because PAM no longer checks for
the file /etc/nologin.
c. Logout as geeko by entering exit.
9. Edit the file /etc/pam.d/login to uncomment the pam_nologin.so
line:
a. Switch to virtual console 3 (Alt+F3).
b. Uncomment the pam_nologin.so line (by removing the #
sign you entered before) so it looks like the following:
auth required pam_nologin.so
c. Return to the command mode by pressing Esc; save the file
and exit vi by entering :wq.
10. On virtual console 4, try logging in as geeko.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 3-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
12. On virtual console 4, try again to log in as geeko.
As the file /etc/nologin does not exist, login for normal users is
enabled again.
13. Log out as geeko by entering exit.
14. Switch to virtual console 3 and log out as root by entering exit.
(End of Exercise)
WB 3-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer User Access and Security
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 3-2 Configure the Password Security Settings
3. Start the YaST Control Center; then select Security and Users >
Local Security.
The Local Security Configuration dialog appears.
4. Make sure Custom Settings is selected; then select Next.
The Password Settings dialog appears.
5. From the Password Encryption Method drop-down list, select
MD5.
6. Continue by selecting Next.
The Boot Settings dialog appears.
7. From the Interpretation of Ctrl + Alt + Del drop-down list, select
Halt.
8. Continue by selecting Next.
The Login Settings dialog appears.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 3-5
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
9. Accept the default settings by selecting Next.
The Adding User dialog appears.
10. Accept the default settings by selecting Next.
(End of Exercise)
WB 3-6 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer User Access and Security
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 3-3 Use ACLs
In the first part, as root, create a directory acl_test in /tmp and set
the rights rwx for the owner only. As geeko, try to change into that
directory.Use ACLs to allow geeko to change into that directory.
In the third part of the exercise, remove the ACL for geeko from the
second file you created in the second part of this exercise. View the
output from ls -l and getfacl for this file, then remove all ACLs and
repeat ls -l and getfacl for the file.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 3-7
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
4. Limit the file system permissions for the directory by entering
chmod 700 acl_test
5. Open a second terminal window as the user geeko.
6. Try changing to the test directory by entering
cd /tmp/acl_test/
The command fails, because geeko (who is not the owner of the
directory) has no permission to read and change into the
directory.
7. Switch to the root terminal.
8. Display the minimum ACL of the directory by entering
getfacl acl_test
9. Add an extended ACL by entering
setfacl -m u:geeko:rwx acl_test/
10. 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.
11. Switch to the root terminal and display the extended ACL of the
directory by entering
getfacl /tmp/acl_test/
WB 3-8 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer User Access and Security
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part II: Configure a Default ACL for a Directory
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 3-9
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part III: Delete an ACL
(End of Exercise)
WB 3-10 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Configure the Network Manually
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 4-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 4-1 Configure the Network Connection Manually
In the first part, use the ip command to find out the current settings
for IP address, routes, mac address, and the file used to store the
hardware configuration of the network card in
/etc/sysconfig/hardware/ and the configuration options in that file.
WB 4-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Configure the Network Manually
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part I: Note the Current Network Configuration
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 4-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
10. Record the name of the file:
x If there are several files with the above pattern, enter lspci in a terminal
window. The output shows the PCI addresses of PCI hardware
components in your computer.
11. Display the contents of the file by entering one of the following:
❑ cat hwcfg-id-PCI_address
or
❑ cat hwcfg-bus-pci-PCI_address
12. Record the following parameters:
❑ MODULE=
❑ MODULE_OPTIONS=
❑ STARTMODE=
You use these parameters and the hwcfg filename in Part IV to
manually create the file.
WB 4-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Configure the Network Manually
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
6. Verify that the network connection is not working any more by
entering
ping 10.0.0.254
7. Enter ip address show.
Note that the device eth0 is not up anymore or no longer listed.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 4-5
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part IV: Save the Network Connection to Interface and
Hardware Configuration Files
WB 4-6 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Configure the Network Manually
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
12. Add the following line to the file:
default default_gateway_IP_address - -
13. Save the file and exit vi.
14. Reboot your system (init 6) and log in as geeko with a password
of novell.
15. From a terminal window (as root), verify that the network
configuration is loaded correctly by entering the following
commands:
ip address show eth0
ip route show
16. Verify that the network connection is working properly by
entering
ping 10.0.0.254
(End of Exercise)
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 4-7
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
WB 4-8 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer Linux Processes and Services
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 5-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 5-1 Manage Linux Processes
In this exercise, you start and stop processes and change their
priorities.
In the first part of the exercise, start and suspend xosview, move it
to the background and foreground, and stop it.
In the second part, start xosview and set the priority of the running
program to a nice value of -5. Start xeyes with a nice value of 10.
WB 5-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer Linux Processes and Services
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
5. Start the xosview program by entering
xosview
Notice that the terminal is not available to receive new
commands (no command is line displayed), because the
xosview program is running in the foreground.
6. Arrange the xosview window and the terminal window so that
you can see them both; then select the terminal window to
activate it.
7. Suspend the Xosview program by pressing Ctl+z.
Notice that the data is no longer being updated in Xosview.
8. View the job in the background by entering
jobs
9. View the sosview process running from the current terminal by
entering
ps -l (lower case L)
The process shows a status of T, which means that it is being
traced or stopped.
10. Resume the xosview program running in the background by
entering
bg 1
The xosview program is running again (notice the data being
updated).
As it is running in the background, you can use the terminal
window to enter other commands.
11. Verify that the job status is running by entering
jobs
12. View the xosview branch in the process tree by entering
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 5-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
13. Bring the xosview process into the foreground by entering
fg 1
14. Close the terminal window.
16. Start xosview in the background so that it runs when the terminal
window closes by entering
nohup xosview&
17. Close the terminal window.
top
20. View only the processes started by geeko by typing u; then enter
geeko.
21. Check for the xosview program (xosview) listed in top.
ps PID_of_xosview_process
26. Stop the xosview program and check the status by entering the
following commands:
kill PID_of_xosview_process
ps aux | grep xosview
WB 5-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer Linux Processes and Services
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
27. Start the xeyes program in the background by entering
xeyes&
28. Kill the xeyes program by entering
killall xeyes
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 5-5
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
8. View all processes by entering
ps alf
The xosview process is now displayed.
9. Change the nice value for the xosview process to a higher priority
by entering
renice -10 -p PID_of_xosview_process
10. Verify that the xosview process nice value is set to -10 by
entering
ps alf (lower case L)
11. Exit the shell running as root by entering
exit
You should now be user geeko again.
12. Start the xeyes program in the background with the nice value of
+10 by entering
nice xeyes&
13. Verify that the xeyes process nice value is set to +10 by entering
ps lf (lower case L)
14. Kill the xosview and xeyes processes by entering the following
commands:
kill PID_of_xosview_process
killall xeyes
(End of Exercise)
WB 5-6 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer Linux Processes and Services
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 5-2 Schedule Jobs with cron and at
In the second part of the exercise, create a cron job as a normal user
that logs the output of finger to ~/users.log every minute and
another cron job as root that backs up /etc/ to /export/data2/etc.tgz
using tar and the options czvf every Tuesday at 2 am.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 5-7
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
5. Three minutes from now, log to /var/log/messages who is logged
in by entering the following commands:
at hh:mm
finger >> /var/log/messages
Note: Make sure you enter two > characters in the above
command; if you have only one > character, existing entries in
/var/log/messages will be removed.
6. Exit the at editor by pressing Ctrl+d.
7. View the scheduled at jobs by entering atq (or at -l).
Notice the job number listed.
8. Wait for the 3 minutes to pass; then check the /var/log/messages
file for the finger information by entering
tail /var/log/messages
Login information for geeko is listed at the end of the file.
9. Schedule the same job to run tomorrow at noon by entering the
following commands:
at noon tomorrow
finger >> /var/log/messages
Ctl+d
10. Schedule the date to be logged tomorrow at 2:00 P.M. to the
/var/log/messages file by entering the following:
at 14:00 tomorrow
date >> /var/log/messages
Ctl+d
11. View the scheduled at jobs by entering atq (or at -l).
Notice that the 2 jobs are listed, each with an individual job
number.
12. Remove the job scheduled for tomorrow at 2:00 P.M. by entering
atrm job_number
13. View the scheduled at jobs by entering atq (or at -l).
WB 5-8 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Administer Linux Processes and Services
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part II: Schedule Jobs with cron
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 5-9
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
7. Schedule a cron job as root:
a. su - to root (password novell).
b. Enter crontab -e.
c. Press Insert.
d. Add a job that runs at 2:00 A.M. every Tuesday and creates
a tarball of /etc that is saved in /export/data2/backup by
entering the following:
0 2 * * 2 tar czvf /export/data2/etc.tgz /etc
e. Press Esc.
f. Save the file and exit the vi editor by entering :wq.
g. Verify that the job is in the crontab file for root by entering
crontab -l
8. Remove root’s crontab file by entering
crontab -r
9. Verify that the crontab file no longer exists by entering
crontab -l
10. Close all open windows.
(End of Exercise)
WB 5-10 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Monitor SUSE Linux Enterprise Server 10
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 6-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 6-1 Gather Information on your SUSE Linux Enterprise Server
10
OS
Hardware Architecture
Processor Type
Hostname
Kernel Release
System Up Time
Load Averages
SLES 10 Version
Free Memory
You can usually use more than one command to get the desired
information.
WB 6-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Monitor SUSE Linux Enterprise Server 10
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Detailed Steps to Complete this Exercise:
cat /proc/meminfo
(End of Exercise)
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 6-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 6-2 Manage System Logging
x The above values (one day, 5 logs, 20 bytes) are used for demonstration
purposes only. In a production environment, these values are usually much
higher.
WB 6-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Monitor SUSE Linux Enterprise Server 10
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part I: Modify the syslog-ng Configuration
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 6-5
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
5. Check the configuration by logging an entry to the info level in
the local4 facility:
a. Enter the following to monitor the activity of the log file:
tail -f --retry /var/log/local4.info
(You will see a warning regarding the option --retry, but
entries will appear when you complete the next step.)
b. Open another terminal window and 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 is 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
d. In the terminal window where the log activity is being
monitored with tail -f, stop the monitoring by pressing
Ctrl+c.
6. Repeat step 5 for the log level debug. Replace the command in
step a by the command
tail -f --retry /var/log/local4.debug
and the command in step b by the command
logger -p local4.debug “Info message 2”
x Only those level4 log files with entries will be compressed in Part II of
the exercise during log rotation.
WB 6-6 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Monitor SUSE Linux Enterprise Server 10
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
7. (Conditional). If no messages appear, there might be something
wrong with your syslog configuration, for instance a typo or a
missing “;”.
To find out what is wrong, enter rcsyslog restart and see if
syslog starts properly. If there is an issue with the configuration,
an error message will say so. As the line numbers in
/etc/syslog-ng/syslog-ng.conf and
/etc/syslog-ng/syslog-ng.conf.in differ, the line number in the
output is not accurate for the file you were editing. Look near
the line number shown in the output for the error, correct it, and
restart syslog.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 6-7
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
6. Check the directory /var/log for the zipped local4 log files by
entering
ls -l /var/log | less
You see files such as the following:
❑ local4.debug-current_date.bz2
❑ local4.info-current_date.bz2
For example, if the current date is July 15, 2006, then the
zipped file for local4.info will be local4.info-20060715.bz2.
The extension is .bz2, as the command to compress files is set
to bzip2 in /etc/logrotate.conf.
(End of Exercise)
WB 6-8 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage System Initialization
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 7-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 7-1 Manage the Boot Loader
x This exercise will not work with a USB keyboard, because the USB drivers
are usually loaded at a later stage of the init process. If your machine is
equipped with a USB keyboard, you would have to add the modules to the
initial RAM disk for this exercise to work.
To be able to do this exercise with a USB keyboard, take the following steps
first:
Find out which USB modules are loaded by entering lsmod in a terminal
window. Then start the YaST Control Center, select System > /etc/sysconfig
Editor; expand the System > Kernel subsection; in INITRD_MODULES,
add the modules used like usbhid uhdi_hcd ehci_hcd. Close the dialogs. In
a terminal window (as root), enter mkinitrd.
WB 7-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage System Initialization
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
6. Using vi, edit /boot/grub/menu.lst.
Put a comment sign (#) in front of the line starting with
gfxmenu.
Add the following line beneath it:
password secret
7. (Optional) To avoid having the password in cleartext in the
configuration file, you can use an MD5-Hash instead. You can
create and include it in the file with the following command
within vi:
1. Press Esc
2. Type :r! echo -e “secret\nsecret” | grub-md5-crypt
3. Press Enter
Some lines of output from grub-md5-crypt will be included in
the file, including the MD5-hash of your password.
Delete the lines from the output of grub-md5-crypt except the
line with the hash. If you still have the line with the secret
password in the file, delete it, too.
At the beginning of the line with the hash, write
password --md5 so that the line looks like the following:
password --md5 $1$t9kdK1$juAcBOwF18QFVf3Cl7b.v0
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 7-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
9. Reset the computer.
You will notice that the start screen looks different now,
because you turned off the graphical menu, .
10. If you want to edit the kernel command line, press p and then
enter the password used in Step 6 or 7. A short help text informs
you about the available options.
11. Press b to boot the computer.
(End of Exercise)
WB 7-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage System Initialization
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 7-2 Manage Runlevels
In the first part, use the runlevel command to find out the current
runlevel and the init command to change to runlevel 3 and then
back to 5.
In the second part, activate the at service atd. The at service allows
commands to be scheduled at a future point in time.
In the third part, reboot your computer and boot into runlevel 3
instead of the default runlevel 5. Login and switch to runlevel 5.
In the fourth part, activate the rsync daemon using the YaST
runlevel editor.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 7-5
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part I: View and Change the Current Runlevel
WB 7-6 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage System Initialization
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part II: Activate the at Service atd
init 1
11. Enter a root password of novell.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 7-7
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
12. Determine if the at service is running by entering
rcatd status
The service is listed as unused because it is not configured to
start at runlevel 1.
13. Switch back to your previous runlevel (5) by entering
init 5
The GUI login screen appears.
14. Log in as geeko with a password of novell.
chkconfig atd -l
Notice that the service is off for all runlevels.
18. Re-enable the service to start at the default runlevels by entering
chkconfig atd on
WB 7-8 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage System Initialization
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
4. In the Boot Options field type 3; then press Enter to boot the
Linux system to runlevel 3.
5. When the login prompt appears, log in as root with a password
of novell.
6. Display the current runlevel by entering
runlevel
7. Switch to runlevel 5 by entering
init 5
8. Switch back to the virtual terminal by pressing Ctrl+Alt+F1.
9. Log out as root by entering exit.
10. Switch back to the graphical user interface by pressing
Ctrl+Alt+F7.
11. Log in as geeko with a password of novell.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 7-9
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
7. Start the rsyncd service from the Start/Stop/Refresh drop-down
list by selecting Start Now.
A status message appears indicating that the service started
successfully.
8. Close the status message by selecting OK.
9. Stop the rsyncd service from the Start/Stop/Refresh drop-down
list by selecting Stop Now.
A status message appears indicating that the service stopped
successfully.
10. Close the status message by selecting OK.
12. Close the YaST Control Center and the terminal window.
(End of Exercise)
WB 7-10 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Software for SUSE Linux Enterprise Server
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 8-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 8-1 Manage Software with RPM
In the second part, install the package gcal from the DVD or CD 4,
run the program gcal, and uninstall gcal again.
WB 8-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Software for SUSE Linux Enterprise Server
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
c. Show all the files installed by the wget package by entering
rpm -ql wget
Where can you find information on the wget package?
(Notice the location of the README files.)
2. Using an editor, modify some comment in the /etc/wgetrc file.
See what has changed in the files on your hard drive since the
wget RPM was originally installed by entering
rpm -V wget
Interpret the change information for each file listed by using
Table 8-2 in the manual.
3. View the documentation files for the at command by entering
rpm -qd wget
Notice that some of the files are still compressed (*.gz).
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 8-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
8. List all files included in the installed gcal package by entering
rpm -ql gcal
9. Remove the gcal package by entering
rpm -e gcal
10. Verify that the package is no longer installed by entering
exit
12. Close the terminal window.
(End of Exercise)
WB 8-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Software for SUSE Linux Enterprise Server
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 8-2 Manage Shared Libraries
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 8-5
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
3. Rebuild the library cache by doing the following:
a. View the library cache by entering
ldconfig -p
b. Rebuild the system library cache by entering
ldconfig -v
4. View the contents of the /etc/ld.so.conf file by entering
cat /etc/ld.so.conf
5. Close the terminal window.
(End of Exercise)
WB 8-6 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Backup and Recovery
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 9-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 9-1 Back up Files with YaST
1. Open the YaST Control Center; then select System > System
Backup.
2. Select Profile Management > Add.
3. Enter Course3072; then select OK.
4. In the Filename field, enter /tmp/course3072.tar.
5. Select Next.
6. Select Next one more time. A list of directories and file systems
which are not going to be included in the backup is displayed.
7. Select Add > Directory.
8. Enter /home; then select OK.
We assume, that the home directories are backed up in a
different way.
9. Select OK.
10. In the profile overview, make sure the profile Course3072 is
highlighted; then select Create Backup.
11. Wait till the backup has been completed (this may take some
time).
12. Have a look at the structure of the tar archive in
/tmp/course3072.tar. This can for example be done with the
command:
tar -tf /tmp/course3072.tar
(End of Exercise)
WB 9-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Backup and Recovery
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 9-2 Create Backup Files with tar
x In this exercise, you copy backup files to the directory /tmp. This is only done
to demonstrate using backup methods. You should never make an actual
backup to the directory /tmp.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 9-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part II: Create an Incremental Backup
(End of Exercise)
WB 9-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Backup and Recovery
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 9-3 Create Drive Images with dd
x To perform this exercise, you need a data CD. You could also use a DVD, but
the copying process takes much longer and you need more free space on your
hard disk to store the disk image.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 9-5
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
8. Change to the /media/device_name directory and enter ls.
Note that the content of the image file is identical to the original
media.
9. Change to your home directory and unmount the image file by
entering the following commands:
cd
umount /mnt
10. Delete the image file by entering
rm /tmp/course_cd.iso
(End of Exercise)
WB 9-6 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Backup and Recovery
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 9-4 Create a Backup of a Home Directory with rsync
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 9-7
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part II: Perform a Remote Backup with rsync
Wait until a partner has completed the previous steps in the exercise;
then do the following:
1. From the root terminal window, perform a remote backup of your
partner's geeko home directory by entering (in one line):
rsync -ave ssh root@partner_ip_address:/home/geeko
/tmp/rsync_test
2. When a connection message appears, continue by entering yes;
then enter a password of novell.
3. Ask your partner to create a new file in the geeko home directory
by entering
touch new_file2
4. Enter the rsync command again (in one line):
rsync -ave ssh root@partner_ip_address:/home/geeko
/tmp/rsync_test
Notice that only the new file is copied by rsync.
5. Clean up the backup directory by entering
rm -r /tmp/rsync_test/*
6. Close all terminal windows.
(End of Exercise)
WB 9-8 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Backup and Recovery
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 9-5 Configure a cron Job for Data Backups
(End of Exercise)
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 9-9
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
WB 9-10 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Printing
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 10-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 10-1 Change Your Printer Configuration
In this exercise, you add a local printer and print to a remote queue.
The exercise has two parts.
In the second part, configure a queue on your computer that uses the
printer that is available on the host da1. If this printer does not exist,
for the purpose of this part of the exercise, you can use the CUPS
server running on your own machine.
WB 10-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Printing
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
6. Enter the following:
❑ Name for printing: hplj4
❑ Description of Printer: LaserJet 4 on daxx (where xx is
your host number)
❑ Location of Printer: daxx computer
Make sure that Do Local Filtering is selected; select Next.
A Printer Model dialog appears, with a list of manufacturers
and a list of models.
7. From the manufacturer list, select HP; from the model list, select
LaserJet 4.
8. When you finish, select Next, then Edit.
A Configuration dialog appears.
9. Change the settings of the printing filter by selecting Filter
Settings; then select Edit.
A list of options appears at the top of the screen with a list of
values for each option at the bottom of the screen.
a. Change the number of pages that should be printed on one
sheet of paper by selecting Pages per Sheet.
b. In the Values list, select 2.
c. Scroll through the list of options and select Page Size.
Notice the setting of the page size.
d. If the setting is not Letter, change the page size to US Letter
by selecting Letter.
10. When you finish, select Next.
12. Finish the configuration by selecting Finish; then close the YaST
Control Center.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 10-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part II: Print to a Remote CUPS Printer
WB 10-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Printing
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
13. From the Name for Printing field, record the name of the printer
queue on the instructor’s server:
(End of Exercise)
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 10-5
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 10-2 Manage Printers from the Command Line
Use the lpr and lp commands to print the /etc/hosts file to the queue
hplj4. View the jobs using lpq and lpstat. Delete the first job using
lprm.
WB 10-6 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Printing
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
5. Enter lpstat hplj4.
The first print job has been deleted.
6. Check the status of the printer by entering
lpc status
(End of Exercise)
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 10-7
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 10-3 Restrict Access
WB 10-8 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Printing
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
6. Enter http://localhost:631/ as URL in your browser window.
7. Select Do Administration Tasks.
8. Enter root as the user name and n0vell (with the number zero) as
the password in the authentication dialog.
11. Using the Firefox browser on the client, access the CUPS server
using the URL http://ip_address:631/. You should get access.
12. Have another student try to access your CUPS server on port 631
using Firefox. The access should be denied. To verify, as root,
enter the following in a terminal window on your server:
tail /var/log/cups/access_log
(End of Exercise)
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 10-9
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 10-4 Use the Web Interface to Manage a CUPS Server
In this exercise, add a second printer via the web frontend of CUPS,
even though a second printer is not available at your workstation.
WB 10-10 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Manage Printing
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
13. From the Model list, select HP Color LaserJet 8550 Postscript
(recommended) (en); then select Continue.
14. You should get the message
(End of Exercise)
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 10-11
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
WB 10-12 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Configure Remote Access
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 11-1
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 11-1 Practice Using OpenSSH
WB 11-2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Configure Remote Access
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
2. Using the password novell, check the processes running on your
partner’s system by entering the following:
ssh -l geeko partner_server_IP_address ps aux
A list of all processes currently running on your partner’s server
is displayed.
3. Using the password novell, copy your partner’s /etc/hosts file to
your /tmp directory by entering the following:
scp geeko@partner_server_IP_address:/etc/hosts /tmp/
4. Using the password novell, copy your /etc/hosts file to geeko’s
home directory on your partner’s server by entering the
following:
scp /etc/hosts geeko@partner_server_IP_address:
5. Use sftp to connect to your partner’s computer as geeko by
entering
sftp geeko@partner_server_IP_address
6. Copy the /bin/date program to geeko’s directory on your won
computer by entering
get /bin/date /home/geeko/
7. Quit sftp by entering
exit
(End of Exercise)
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 11-3
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 11-2 Perform Public Key Authentication
WB 11-4 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Configure Remote Access
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
c. Enter ls -al.
Look for an .ssh directory.
d. (Conditional) If a .ssh directory does not exist then create it
by entering
mkdir .ssh
e. Copy the public key to the ~/.ssh/authorized_keys file by
entering
cat id_rsa.pub >> .ssh/authorized_keys
4. Log out from the partner’s server by entering
exit
5. Using ssh, log in as geeko to your partner’s computer by entering
ssh -l geeko partner_server_IP_address
You are prompted for a passphrase, not a password.
6. Log in by entering novell; then log out by entering exit.
7. To track authentication, start the ssh-agent by entering
ssh-agent bash
8. Add your private key to the agent for authentication by entering
ssh-add .ssh/id_rsa
Then enter a passphrase of novell.
9. Using ssh, log in as geeko to your partner’s server by entering
ssh -l geeko partner_server_IP_address
This time you are not prompted for a password or a passphrase.
10. Switch to user root (su -; password novell)
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 11-5
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
11. Open the /etc/ssh/sshd_config file in an editor of your choice and
to the following:
a. Find the line containing PasswordAuthentication and
make sure it is set to no.
b. Find the line containing UsePAM and change its setting
from yes to no.
c. Save the file and close the editor.
12. Restart sshd by entering
rcsshd restart
13. Enter ssh geeko@localhost. You should see an error message,
and no prompt for a password.
14. Using an editor, undo the changes made in Step 11; restart sshd.
(End of Exercise)
WB 11-6 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Configure Remote Access
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Exercise 11-3 Use Remote Administration
This exercise has four parts. You work with a partner. (If there is no
one available with whom to do the exercise, use localhost instead of
the partner’s computer.)
ssh your_partner_IP_address
ssh -X your_partner_IP_address
In the third part, configure remote access to your computer with the
YaST Remote Administration module.
In the fourth part, access your partner’s computer via VNC once
your partner has finished Part 3.
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 11-7
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part I: Remotely Access a Text-Based Version of YaST
x Despite the fact that you entered yast2, the text-based version of the
YaST Control Center appears. The reason for this is that X11 forwarding
is not active in the default configuration of ssh.
WB 11-8 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.
Configure Remote Access
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part III: Configure Remote Administration with YaST
Version 2 Copying all or part of this manual, or distributing such copies, is strictly prohibited. WB 11-9
To report suspected copying, please call 1-800-PIRATES.
SUSE Linux Enterprise Server 10 Administration / Workbook
Novell, Inc. Copyright 2007-NO PRINTING OR DISTRIBUTION ALLOWED
Part IV: Access Your Partner’s Server Remotely
To access the server from a web browser, you and your partner do
the following:
1. From the GNOME desktop, open the Firefox web browser.
2. In the Location field, enter
http://your_partner_IP_address:5801
A VNC Authentication dialog appears.
Although a password is requested, it is not required.
3. Continue by selecting OK.
4. Log in to the remote server’s desktop as geeko (password
novell).
The desktop for your partner’s geeko user appears.
5. When you finish testing the desktop, close the VNC session by
selecting Disconnect (top of the screen).
6. Close all open windows.
(End of Exercise)
WB 11-10 Copying all or part of this manual, or distributing such copies, is strictly prohibited. Version 2
To report suspected copying, please call 1-800-PIRATES.