Guide to Linux Installation and Administration, 2e

Download 24.22 Kb.
Size24.22 Kb.
Guide to Linux Installation and Administration, 2e

Chapter 8 Solutions

Review Questions

  1. Describe the effect of including a hyphen when executing the su command.

It causes you to assume the full environment of the substituted user rather than just the access permissions of that user. e.g. you are changed to that user’s home directory.

  1. A user’s primary group can be a User Private Group.


  1. The /etc/passwd file does not contain which of the following fields:

b. The file privileges for the user

  1. Explain the meaning of this line in the /etc/group file: webmasters:x:710:rthomas,cyang

A group named webmasters with no group password has a GID of 710 and two members, user rthomas and user cyang.

  1. To create or change a password on any user account, the following is used:

c. The passwd command

  1. Name the command and corresponding file that control defaults used by the useradd command.

The useradd -D command displays or alters the defaults; they are stored in /etc/defaults/useradd.

  1. When you add a file to the /etc/skel directory, the file is added to the home directory of users

a. When you create new users after that time

  1. What does the fourth field in /etc/passwd contain?

The Group ID number assigned as the primary group for the user account named on that line.

  1. The Linux command used to format a Linux ext3 hard disk partition is:

a. mke2fs

  1. Why should you not use a standard text editor to add users to /etc/passwd.

You can create typographic errors; another system admin may be editing the file across the network; you can’t easily perform all the related functions like copying /etc/skel and creating a home directory, which the utilities take care of.

  1. If you enter a new password for a user account that can be easily guessed, the message BAD PASSWORD appears and the password is

a. Not updated unless you are root

  1. Disk quotas let you manage how much disk space a user consumes, but they must be first enabled

c. On the file system where you want the quota to apply

  1. Describe one simple method of temporarily disabling a user account without using a graphical utility.

Use passwd to change the user's password. OR Use a text editor to insert a * at the beginning of the encrypted password in /etc/shadow.

  1. A mounted file system is one that:

a. Has been included as part of the Linux directory structure

  1. How can you switch between multiple virtual consoles in text and graphical environments?

From a text mode, use Alt+Fx;

From a graphical mode, use Ctrl+Alt+Fx

(The x is a number from 1 to 6)

To return to graphical mode from any text mode console, use Alt+F7.

  1. The Shadow Password Suite enhances Linux security by:

b. Hiding encrypted passwords in a file that only root can read

  1. Which of the following is an acceptable way to create a new user account:

b. Use the redhat-config-users utility in Red Hat Linux.

  1. The fdisk utility is used to:

c. Establish partitions of the correct type to hold a Linux file system.

  1. The df utility provides information about which one of the following:

c. File system capacity, device name, and percentage used status

  1. Describe the effect of the defaults options in a configuration line of the /etc/fstab file.

See the last line of Table 8-4.

  1. Describe at least four fields of information provided by the command ps auxf.

The user who started the process, PID, percentage of CPU and memory used by the process, amount of memory used, terminal on which process was started, current status, start time, total CPU time used, command executed to launch the process, parent process tree, and a couple of others that have not been explained (e.g. Resident Set Size—RSS. See the ps man page for details.)

  1. Describe the main advantage of having swap space located on a hard disk separate from the Linux data partitions.

The kernel is then not competing with regular programs for access to the hard disk—two disks can operate somewhat independently, increasing throughput.

  1. List two reasons why a user account might need to be disabled.

An employee is being laid off; an employee is on long-term vacation or leave; a customer has not paid for account fees

  1. If you attempt to unmount a mounted file system and receive an error message, the most likely cause is:

d. One or more users are working in the file system.

  1. By starting multiple jobs from one shell, you can

c. Manage those jobs with the jobs, fg, and bg commands

Hands-on Projects

Project 8-1

6. Review the contents of the /etc/skel directory:

ls /etc/skel

Why is nothing listed?

All the files are hidden.

Project 8-2

7. Try to list the contents of the floppy disk again:

ls /mnt/floppy

Why doesn’t the file appear?

The floppy disk’s file system is not part of your Linux file structure because it was unmounted.
17. Would you expect this step to immediately affect the current state of the swap space?

No, the /etc/fstab file is not referred to unless a command checks it, such as a mount or swapon –a command.
Project 8-3

9. Switch to virtual console 3. What result do you see?

The man command has ended and you see the command prompt again.
13. Has the PID of the man command changed?

Yes, it has.
16. Switch to virtual console 3. What result do you see and what do you conclude?

You see a login prompt. The shell and the man command have ended. You should conclude that ending a process also ends all of its child processes.
Download 24.22 Kb.

Share with your friends:

The database is protected by copyright © 2024
send message

    Main page