Lab Questions

Lab 1


You want to upgrade the video card in your Linux system. Your old video card is slow and doesn't have enough display memory to provide you with the resolution and color depth you require. You have obtained a new ATI 32MB Radeon card (I'm using this product for example purposes only). What steps might you follow to replace your old card with your new card?

image from book



    1. Before you stop Linux on your computer, you should configure it so it no longer attempts to start the X server when Linux boots. This is controlled by the initdefault line in the /etc/inittab file. Edit this file and change the second field from 5 (Multi-User With X Support) to 3 (Multi-User With No X Support). You could use vi, joe, emacs, or any other suitable text editor to do this job.

    2. Perform an orderly shutdown on your system at a safe time. Use the shutdown -h now command.

    3. Now that the system is off, replace your video card.

    4. Start your computer and boot into RHEL. During the boot process, the Red Hat hal hardware detection system or the kudzu command automatically probes for new hardware. If this probe finds your new video card, you can configure it when prompted.

    5. If the automated hal or kudzu tools fail to find your new hardware, you should use the root account to run the Red Hat Display Settings tool.

    6. The Red Hat Display Settings tool should correctly identify your new hardware. You should select the correct amount of display memory (32MB) and the graphics resolutions and color depths you desire. Otherwise, you can configure it manually using the available settings.

    7. Test the result. Run the startx or init 5 command to start the Linux GUI.

Lab 2


You want to see what happens when there are problems starting the Linux GUI. With RHEL 5, the server is configured by default. The configuration of the X server is stored in the /etc/X11/xorg .conf configuration file. Before Linux starts the X server, it reads this file. To do this lab, you'll want to back up your current /etc/X11/xorg.conf file, delete a line in the file, and then reboot your computer into runlevel 5. You can restore it after the lab is complete.

image from book



  1. Back up /etc/X11/xorg.conf to a safe location such as your home directory.

  2. As the root user, delete any active line in the /etc/X11/xorg.conf file.

  3. Open /etc/inittab in your favorite text editor. Look at the line with initdefault. Change the number right before this variable from a 3 to a 5 if required.

  4. When you reboot your computer, observe what happens when Linux tries to find the default login display manager. Review the Xorg.0.log file.

  5. Restore your original settings.

    If you are interested in more experiments, try deleting other lines in xorg.conf. Alternatively, try changing ownership of the .Xauthority file for a specific user to root. Log in as that user, run startx, and observe what happens.

Lab 3


For this lab, you'll need two Linux computers connected over a network and a shared NFS directory from the local computer. You can use the same directory that you may have used in Chapter 2 to share the RHEL installation files. Start a Secure Shell connection between the two computers. Start the GUI on the local computer, and use the Secure Shell to log in remotely to the other computer.

Once you log in, run the Red Hat root password program from the remote computer. Make changes to the password. When you log out and try to log back into the remote computer, you should be able to confirm that the root password on the remote computer has changed.

image from book



For this lab, you'll need two Linux computers connected over a network and a shared NFS directory from the local computer. You can use the same directory that you may have used in Chapter 2 to share the RHEL installation files. You'll start a Secure Shell connection between the two computers. You'll start the GUI on the local computer, and use the Secure Shell to log in remotely to the other computer, with the -X or -Y switch. You can then see what happens when you start X clients from the remote computer.

Once you do, run the Red Hat GUI firewall program from the remote computer. Make changes to the firewall, and see what happens. Finally,

  1. On the local computer, start the GUI. If you're currently at the text interface, you can do so with the startx command.

  2. Open a command line interface. Assuming you're using the default GNOME desktop, right-click the desktop and click New Terminal from the pop-up menu.

  3. In the new terminal, confirm any currently exported directories with the showmount -e command. Based on /etc/exports, select a directory that is set as writable. Use the techniques described in Chapter 10 if required to make it so. You'll be connecting back to one of these directories from your remote computer.

  4. Authorize access from the remote computer. Open the Security Level Configuration tool and allow access through SSH.

  5. Connect to the remote computer using the Secure Shell. Assuming the remote computer is named desktop2, run the following command:

     # ssh -X root@desktop2 

    (If you have a problem making the connection, you may need to go to the remote computer and activate the Secure Shell service with the service sshd start command. You can also substitute the IP address for the computer name.)

  6. Enter the root password on the remote computer when prompted.

  7. Now try running the system-config-rootpassword command. If successful, you'll be changing the root password on the remote computer. (If this command is not available, you'll have to install the RPM package of the same name.)

  8. Log out of the remote computer. Log back in using the ssh command from step 5. Did the root password change?

  9. Restore the original root password on the remote computer.

    Think about this a bit. Do you really want to allow root logins through the SSH service? Using what you learned from Chapter 13, change the /etc/ssh/sshd_config file to disable root logins. If in doubt on how to do this, review the associated man page and the PermitRootLogin directive.

Lab 4


In this lab, you'll set up a GUI workstation. It'll start with the kdm login manager and automatically start GNOME, open the Firefox Web browser, and start a gnome-terminal session when you boot this Linux computer.

image from book



  1. Since you're setting up this workstation for a user, you'll want it to start automatically in the GUI. To do so, open the /etc/inittab file in a text editor, and make sure the initdefault variable is set to runlevel 5 as follows:


  2. Make sure you don't have other settings defined in the local home directory, in the ~/.xinitrc file.

  3. As you want to start with the kdm login manager, you'll want to set it as the preferred login manager in the /etc/X11/prefdm file. You can do it by setting the preferred variable as shown:


  4. Make sure that GNOME is the default desktop. If you see an .Xclients-default file, it should contain the following line:


  5. If you don't see this line, or the file does not exist, you can set it up and make GNOME the default desktop with the following command (you may need to install the switchdesk RPM):

     # switchdesk gnome 

  6. Now reboot your computer. From the command line, you can run the reboot command. Alternatively, if you're already in GNOME, click System | Log Out and select the Reboot option.

  7. If you've taken the steps described, you should now see the xdm login manager. Log in through that interface.

  8. Now in GNOME, click System | Preferences | More Preferences | Sessions. This opens the Sessions utility.

  9. Click the Startup Programs tab. Click Add. This opens the Add A New Session window.

  10. Enter the gnome-terminal command and click OK.

  11. Repeat step 9.

  12. Enter the firefox command in Add A New Session window and click OK.

  13. Click Close in the Session window.

  14. Log out of GNOME, and log back in.

  15. You should now see the GNOME desktop with the gnome-terminal command line interface and the Firefox Web browser.

RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302)
Linux Patch Management: Keeping Linux Systems Up To Date
ISBN: 0132366754
EAN: 2147483647
Year: 2004
Pages: 227
Authors: Michael Jang © 2008-2017.
If you may any questions please contact us: