482
◾
Linux with Operating System Concepts
5. Why might a user want to change the order that bootable devices are tested?
6. You want to set up a dual boot computer between Windows 7 and Red Hat Linux.
Which boot loader program should you use?
7. You want to set up a dual boot computer between Ubuntu and Red Hat Linux. Which
boot loader program could you use?
8. What is the role of initramfs?
9. What does pivot_root do?
10. What does the number 2 mean in the following instruction? What does initdefault
mean?
id:2:initdefault:
11. What is the difference between runlevel 2 and runlevel 3?
12. Why would you never use runlevel 6 in your initdefault statement in inittab?
13. Examine the directory /etc/rc5.d. What types of files are stored here?
14. In the directory /etc/rc2.d, what does the 60 refer to in the file K60nfs?
15. What files in /etc/rc0.d start with the letter S? Why are there so few?
16. Compare the S files in /etc/rc0.d to those in /etc/rc6.d. What are the differences?
Explain them.
17. For runlevel 5, you want the services dnsmasq and nfs started and abrt-ccpp stopped.
What would you do to accomplish this?
18. When
using the program
chkconfig
, you see the following output for kdump:
0: off 1:off 2:off 3:off 4:off 5:off 6:off
What can you conclude by this?
19. Match the following activities with the service that handles it:
a. monitors laptop battery fan
i. postifx
b. maintains website security certificates
ii. cvs
c. manages multiuser documents
iii. named
d. monitors for added or removed hardware
iv. acpi
e.
manages software for RAID
v. certmonger
f. runs the BIND DNS server
vi. ypbind
g. enables network file system sharing
vii. mdadm
h.
mail
service viii.
nfs
i. name server for NIS networks
ix. haldaemon
System
Initialization and Services
◾
483
20. How do the three scheduling services (see Table 11.3) differ?
21. What is the difference between the auditd files auditd.conf and audit.rules?
22. For auditd, write a rule that will log all attempts to
a. access/etc.
b. execute the file/usr/bin/passwd.
23. Provide two ways to determine if the service cpuspeed is currently running.
Questions 24–30 pertain to the atd service script (from Section 11.5).
24. In comments under chkconfig, we see 345, 95, and 5. What do these three numbers
mean?
25. The
function
script contains a umask instruction and the definition of a PATH
variable. Since umask and PATH already exist for root, why are these needed?
26. When doing /
sbin/service atd start
, if the function call to start results in
an error code of 5, what does this mean?
27. When doing /
sbin/service atd start
, if the function
call to start results in an
error code of 6, what does this mean?
28. When doing /
sbin/service atd stop
, if the function call to stop results in an
code of 3, what does this mean?
29. What is the difference between
rh_status_q
and
rh_status
?
30. Assume the atd service (the executable) can receive a parameter, -d, to display all
waiting at and batch jobs. We want to add
display
as a legal parameter to atd.
Specifically, how would you modify the atd script to accomplish this?
Hint
: you need
to modify the case
statement and add the code, preferably in a function, to handle the
display action.
31. Using the Firewall configuration GUI, how would you set it up so that your firewall
accepts SMTP messages?
32. Using the Firewall configuration GUI,
how could you add telnet, port 23?
33. Which priority level is more severe (with respect to logging messages), err or crit?
Explain.
34. You have modified the file /etc/sysconfig/syslog.conf by adding
lpr .* /var/log/printer
You have sent several print jobs to the printer and even witnessed some errors, yet nothing
has been logged to the log file. Why not?
35. Which files would you work with to configure nfs?
485
C h a p t e r
12
Network Configuration
T
he learning outcomes of this chapter are
• To understand the nature of a computer network
• To understand the TCP/IP protocol
• To be able to configure the Linux network through configuration
files and services,
including the Linux firewall
• To understand the difference between static and dynamic IP addresses and how to
use DHCP
• To be able to use the network program ip
• To be able to write scripts that support network-monitoring activities
12.1 INTRODUCTION
Without network access, you are limited to the software that
comes with your computer
and are unable to access any network resources (printers, file servers, web servers, etc.). To
establish network access, you need to do the following:
• Have a network interface that connects your computer to your network access point.
In Linux, all computers have an interface called lo. lo is your
Do'stlaringiz bilan baham: