1. |
|
|
Answers
1. |
|
2. | In this lab, you'll want to use the Red Hat Printer Configuration utility to connect a printer to your Linux system. The printer can be local or remotely connected through your LAN. As you'll want to create a printer class, you'll need more than one printer. (Hint: You can configure the same printer as many times as necessary, as long as you use different names.) If you have only one physical printer, you can set up multiple print queues with different printer names. CUPS sees each print queue as if it were a separate printer. Once you've created multiple printers, return to the Printer Configuration tool. Run the system-config-printer command in a GUI. Navigate to http://localhost:631. Click Add Class. Follow the prompts to create a printer class with the printers that you've configured. Once you've created a new printer class, inspect the result in the /etc/cups/classes.conf configuration file. Check the contents of your /etc/printcap and /etc/printers.conf files. What are the names of the printers that you see? Do you see any surprises in the list? If you have a Microsoft Windows computer on your network, activate the Samba service if required. Check the printer names as shown in the browse list. Do you see any surprises on this list? (For more information on Samba, see Chapter 10.) |
|
Answers
2. | Starting the Printer Configuration utility is easy. One way in the GUI is to press ALT-F2 and then type system-config-printer in the text box that appears. Then you can click the New Printer button to start a configuration wizard. If you like, you can create different print queues for the same printer. Just repeat the same process, using a different printer name. When you've created two or more printers, click New Class. This starts a similar configuration wizard, where you can collect preconfigured printers of your choice in a print class. As with new printers, a print class requires a name, description, and location. Click Forward; select more than one computer as members of the printer class. Click Forward; once your new printer class is confirmed, click Apply. You should now see the printer class and member printers in the /etc/cups/classes.conf file. You'll find a list of printers in /etc/printcap; you'll find the names of any configured printers and printer classes in this file. You should also see the list of printers in /etc/printcap in any Microsoft Windows Network Neighborhoods or My Network Places that is connected to the same network. This assumes that you've activated a Samba server on the local print server computer, of course. |
3. | As the root user, create jobs that change the login message for users at the text console. To do so, you'll want to change the content of /etc/motd. Make sure that people who log in at different times get appropriate messages:
|
|
Answers
3. | To modify the login messages as noted, take the following steps:
Save the file. As long as the cron daemon is active (which it is by default), the next user who logs into the console should see the message upon a successful login. If you want to test the result immediately, the date command can help. For example, the following command
# date 06120659 sets a date of June 12, at 6:59 A.M., just before the cron daemon should execute the first command in the list. (Of course, you'll want to substitute today's date.) |
4. | In this lab, you'll find the value of several different log files. In preparation, use the wrong password to log into a regular account. Then take the following steps:
|
|
Answers
4. | There are no secret solutions in this lab; the intent is to get you to review the contents of key log files to see what should be there. When you review the anaconda.* files in /var/log and compare them to other files, you may gain some insight on how to diagnose installation problems. In future chapters, you'll examine some of the log files associated with specific services; many are located in subdirectories such as /var/log/samba/ and /var/log/httpd/. The failed login should be readily apparent in the /var/log/secure file. You may be able to get hints in the output to the utmpdump btmp command. When you review the /var/log/cron file, you'll see when standard cron jobs were run. Most of the file should be filled (by default) by the standard hourly job, run-parts /etc/cron.hourly, from the /etc/crontab configuration file. If you've rebooted, you may see the anacron service, and you should be able to search for the job of the same name. While /var/log/dmesg includes the currently booted kernel, it may be the same kernel as the one associated with /var/log/anaconda.syslog, if you haven't upgraded kernels. At the end of /var/log/dmesg, you can find the filesystems mounted to the EXT3 format, as well as currently mounted swap partitions. For example, the following lists swap partitions that happen to be on two different hard drives:
EXT3 FS on sda9, internal journal EXT3-fs: mounted filesystem with ordered data mode. Adding 979956k swap on /dev/sda3. \ Priority:-1 extents:1 across:979956k Adding 2031608k swap on /dev/VolGroup00/LogVol01. \ Priority:-2 extents:1 across: 2031608k As you've hopefully discovered, the /var/log/maillog file does not include any information on mail clients, but only servers. Red Hat used to include a mouse configuration tool. The automatic configuration for pointing devices is now sufficiently reliable; input device information is automatically added to the xorg.conf configuration file and included in the X Window as shown with <default pointer> messages in the /var/log/Xorg.0.log file. |
The three directives typically found in the /etc/sysconfig/network file are NETWORKING, NETWORKING_IPV6, and HOSTNAME. If you allow a DHCP server to assign host names, the HOSTNAME directive isn't required.
The command that assigns an IP address of 192.168.99.44 to an eth1 network card is
# ifconfig eth1 192.168.99.44
The command that returns the current routing table is
# route -n
The netstat -nr command works as well.
The command that deactivates the eth0 network device is
# ifconfig eth0 down
Alternatives are available, such as ifdown eth0.