[GLLUG] ch 12 notes/answers
Jolyon Michael Vincent
vincen21 at msu.edu
Wed Apr 7 18:32:36 EDT 2004
Linux+ Guide to Linux Certification
End of Chapter Solutions
Chapter 12 Solutions
Review Questions
1. If a system has three printers attached to it, only one can be designated
as the default printer and this default printer applies to all users on the
system.
True or False?
Answer: False
2. The process of sending print jobs from the print queue to the printer is
called?
a. Spooling
b. Queuing
c. Sorting
d. Sending
e. Redirecting
f. Printing
Answer: f
3. You may clear a log file simply by redirecting nothing in to it.
True or False?
Answer: True
4. When a printer is disabled ________.
a. The print queue will not accept jobs and send a message to the user
noting that the printer is unavailable
b. The print queue will accept jobs into the print queue and hold them there
until the printer is started again
c. The printer will appear as off line when a lpc request is sent
d. The print queue will redirect all print jobs sent to it to /dev/null
Answer: a
5. What is the name used to describe a user providing a user name and
password to log onto a system?
a. validation
b. authorization
c. logon
d. authentication
e. certification
f. substantiation
g. confirmation
Answer: d
6. Although both users and groups may have passwords attached to them,
groups typically do not have passwords assigned to them.
True or False?
Answer: True
7. What command may you use to lock a user account?
a. lock username
b. close username
c. secure username
d. usermod –L username
e. useradd –L username
Answer: d
8. What command is used to alter the primary group associated with a given
user temporarily?
a. It cannot be done as a users primary group is important and set
b. chggrp
c. gpasswd
d. newgrp
Answer: d
9. What command is used to send a print job to the default printer named
Printer1? (choose all that apply)
a. lpr –P Printer1 file
b. lpr Printer1 file
c. lpr file
d. lpc –P Printer 1 file
e. lpq Printer1 file
f. lpd Printer1 file
Answer: a,c
10. You look at the appropriate field in /etc/shadow to see when a password
was last changed and observe a value indicating 11000. What does this value
indicate?
a. You are looking at the wrong field
b. You are looking in the wrong file; it should be /etc/passwd
c. Like the user’s password the date it was last changed in encrypted for
security reasons
d. It is in a measure of time in hours since January 1, 1980
e. It is in a measure of time in days since January 1, 1970
Answer: e
11. When creating a user from the GUI you cannot specify the UID; this can
only be done from the command line.
True or False?
Answer: False
12. What is the name of the file which contains a listing of all users on
the system?
a. /etc/passwd
b. /etc/passwrd
c. /etc/users/conf
d. /etc/shadow
e. /etc/password
Answer: a
13. UID’s and GID’s are unique to the system and once used can never be
reused.
True or False?
Answer: False
14. What command is used to view or alter the status of printers on the
system ?
a. lpq
b. lpr
c. lpd
d. lpc
Answer: d
15. What is the name of the utility used to rotate log files?
a. There is none
b. jetpack
c. logrotate
d. logbackup
Answer: c
16. You can lock a user account by changing the default login shell to an
invalid shell in /etc/passwd.
True or False?
Answer: True
17. When a printer is stopped____________.
a. The print queue will not accept jobs and send a message to the user
noting that the printer is unavailable
b. The print queue will accept jobs into the print queue and hold them there
until the printer is started again
c. The printer will appear as off line when a lpc request is sent
d. The print queue will redirect all print jobs sent to it to /dev/null
Answer: b
18. When referring to the /etc/syslog.conf file, __________ specifies
information from a certain area of the system whereas ________ is the level
of importance of that information.
a. section, priority
b. service, precedents
c. process, degree
d. facility, priority
Answer: d
19. Most log files on the system will be found in which directory?
a. /etc/logfiles
b. /etc/log
c. /etc/var/log
d. /var/log
e. /dev/log
Answer: d
20. What file contains default information such as UID and GID ranges and
minimum password length to be used at user creation?
a. /etc/skel
b. /etc/passwd
c. /etc/login.defs
d. /etc/default useradd
Answer: c
21. What is the background process responsible for printing on Linux?
a. lpc
b. lpr
c. lpd
d. lpd.d
e. lpq
Answer: d
22. What command would you use to unlock a user account?.
a. unlock username
b. open username
c. free username
d. usermod –U username
e. useradd –U username
Answer: d
23. If you run pwconv, where will passwords be stored on the system?
a. /etc/passwrd
b. /etc/passwd
c. /etc/shadow
d. /etc/skel
Answer: c
24. Along with a listing of user accounts, the /etc/passwd file also
contains information on account expiry.
True or False?
Answer: False
25. You use lpq and determine that a user named User1 has placed two large
print jobs in the queue for Printer1 that have yet to start printing. They
have print job ID’s of 455 and 457 respectively. What command would you
use to remove these two jobs from the print queue?
a. lpq –r 455 457 Printer1
b. lprm –P Printer1 User1
c. lprm –P Printer1 455 457
d. lpq –r –P Printer1 455 457
Answer: c
26. Where are the default home directory path and login shell stored?
a. /etc/skel
b. /etc/passwd
c. /etc/login.defs
d. /etc/default useradd
Answer: d
27. You are aware that /etc/printcap has a very particular syntax and
structure; you painstakingly modify it and restart the printer daemon and
fail to use your printer. You then view the /etc/printcap file and notice
that all your hard work has disappeared. What should you do?
a. You must use the Red Hat Printer Configuration Tool as /etc/printcap is
read-only
b. Log on as root and ensure your primary group is root
c. Make the very same careful changes you made before, but this time to the
/etc/printcap.local file. After editing this file, run the command
printconf-backend to merge the changes into /etc/printcap.
d. Make the very same careful changes you made before, but this time to
/etc/printconf-edit
Answer: d
28. What option used with the lpc command will both enable and start a
printer?
a. start
b. enable
c. up
d. launch
Answer: c
29. What command is used to delete a user account?
a. usermod –d username
b. del username
c. userdel username
d. rm username
Answer: c
30. The system log daemon obtains information on what data to read and where
to store the information from________ ?
a. /syslogd.config
b. /dev/log/conf
c. /etc/syslog.conf
d. /var/syslog.conf
Answer: c
31. The process of sending print jobs to the print queue to be held until
the printer is ready is called?
a. Spinning
b. Queuing
c. Spooling
d. Sorting
Answer: c
32. You can add users to groups on the system by modifying the last field in
/etc/group.
True or False.
Answer: True
Hands-On Projects
Project 1
Step 1: Not available
Step 2: Not available
Step 3: two other methods include princonf-tui and using the menus to start
the Red Hat Printer Configuration Tool
Step 4: Not available
Step 5: Not available
Step 6: depends on computer
Step 7: Not available
Step 8: Not available
Step 9: Yes – it is indicated on the line
Step 10: Yes, yes
Step 11: Not available
Step 12: Not available
Step 13: lp=, sd=
Step 14: Not available
Step 15: Not available
Project 2
Step 1: Not available
Step 2: Not available
Step 3: The printer from Project 1
Step 4: Not available
Step 5: Not available
Step 6: Not available
Step 7: Not available
Step 8: Not available
Step 9: Not available
Step 10: It made the printer the default printer. The LPDEST variable can
also be set to specify the default printer
Step 11: Not available
Step 12: Not available
Step 13: No, rm=, rp=, sd=
Step 14: Not available
Step 15: Not available
Project 3
Step 1: Not available
Step 2: The default printer is listed (netprinter) because you did not
specify the printers to view
Is printing enabled for fakeprinter? yes
Is spooling enabled for fakeprinter? yes
Is printing enabled for netprinter? yes
Is spooling enabled for netprinter? yes
Step 3: Not available
Step 4: Not available
Step 5: Is printing enabled for fakeprinter? no
Is spooling enabled for fakeprinter? yes
Is printing enabled for netprinter? no
Is spooling enabled for netprinter? yes
Step 6: fakeprinter since netprinter prints to fakeprinter across the
network
Step 7: Not available
Step 8: Not available
Step 9: fakeprinter since printer1 is an alias for fakeprinter
Step 10: Not available
Step 11: the jobs were dequeued
Step 12: yes
Step 13: jobs will be printed across the network to fakeprinter
Step 14: there are no jobs in the queue for netprinter; there is one job in
the queue for fakeprinter since netprinter was started and printed its
information to the queue for fakeprinter; same job IDs
Step 15: the job was dequeued
Step 16: Not available
Project 4
Step 1: Not available
Step 2: socket; syslog daemon; centralizes logging
Step 3: /var/log/cron
Step 4: Not available
Step 5: Not available
Step 6: Not available
Step 7: information about cron daemon startup is displayed on the last line
Step 8: 4:02am
Step 9: weekly; 4
Step 10: 20; yes
Step 11: 31
Step 12: Not available (answers may vary)
Step 13: Not available
Project 5
Step 1: Not available
Step 2: top; bottom; 37
Step 3: root; root; everyone (mode=644)
Step 4: encrypted password; !!
Step 5: root; root; only the root user (password security – mode=400)
Step 6: file does not exist since all information is now stored in
/etc/passwd
Step 7: encrypted password
Step 8: configures system to store password information in the /etc/shadow
file
Step 9: Not available
Step 10: /bin/bash; /etc/skel; /home
Step 11: hidden environment files and directories – all files are copied
to new user home directories to provide environment variables and files
Step 12: Not available
Step 13: makes the home directory; /etc/default/useradd
Step 14: /bin/bash; /home/bozo; 501
Step 15: no; no
Step 16: Not available
Step 17: all files in Step 11 are present plus the inittab file
Step 18: Not available
Project 6
Step 1: Not available
Step 2: Not available
Step 3: Not available
Step 4: only the login name changed
Step 5: Not available
Step 6: Yes
Step 7: the 7th field
Step 8: the 9th field; the number of days since January 1st 1970.
Step 9: the 4th field
Step 10: the 5th field
Step 11: the 4th field
Step 12: Not available
Project 7
Step 1: Not available
Step 2: Not available
Step 3: Not available
Step 4: a ! was placed at the beginning
Step 5: No
Step 6: Not available
Step 7: Not available
Step 8: they are identical
Step 9: Yes
Step 10: Not available
Step 11: Not available
Step 12: /bin/false is not listed in /etc/shells; yes
Step 13: No
Step 14: Not available
Step 15: Not available
Step 16: Yes
Step 17: Not available
Step 18: Not available
Step 19: Not available
Project 8
Step 1: Not available
Step 2: bozo – users typically manage their own files
Step 3: No
Step 4: 666
Step 5: makes a home directory and assigns a UID
Step 6: Not available
Step 7: /home/bozoette; 666
Step 8: bozoette; yes
Step 9: Not available
Project 9
Step 1: Not available
Step 2: Not available
Step 3: Not available
Step 4: bozoette, groupies
Step 5: bozoettee directory and assigns a UID
Step 6: Not available
Step 7: bozoette, bozoette since bozoette is the owner and bozoette is the
primary group
Step 8: Not available
Step 9: Not available
Step 10: bozoette, groupies since bozoette is the owner and groupies is the
primary group
Step 11: Not available
Step 12: Not available
Step 13: /etc/group
Step 14: Not available
Lab Manual for Linux+ Guide to Linux Certification
Chapter 12 Solutions
Lab 12.1 Configuring Virtual Consoles
Review Questions
1. Which file must you edit to change the run level that your computer boots
into?
c. /etc/inittab
2. How many virtual consoles are there by default in most Linux
distributions?
b. 6
3. Which file must you edit to have additional virtual consoles?
a. /etc/inittab
4. What is the maximum number of virtual consoles?
c. 63
5. To change the number of lines or number of characters per line of your
virtual consoles, you can add a _______________ statement to your boot
loader configuration file (lilo.conf or grub.conf).
vga=
6. If you change your VGA screen size to 80 columns and 50 lines, this
applies to all virtual consoles.
a. True
Lab 12.2 Testing Your Logging
Review Questions
1. You want to monitor the messages log file and have any additional
messages written to the log file also display on your screen. Which command
will do this?
d. tail -f /var/log/messages
2. Which command will send a message of mail facility and info priority?
c. logger -p mail.info This is a test
3. If you make a change to /etc/syslog.conf, you must inform the syslog
daemon of the change by sending it a SIGHUP signal.
a. True
4. Which of the following is the highest priority?
b. alert
5. Which statement, placed in the syslog.conf file, sends all messages of
crit priority and higher to the terminal screens of everyone logged in?
Lab 12.3 Using Named Pipes with Logging
Review Questions
1. Which command will create a named pipe in the directory that log files
reside in?
a. mknod /var/log/logpipe p
2. If you do a long directory listing (ls -l) of a named pipe, the first
character on the line is a:
c. p
3. Which of the following statements in the syslog.conf file is correct if
/var/log/logpipe is a named pipe?
c. local1.debug |/var/log/logpipe
4. One reason why a shell script may not run is that it does not have
execute (x) permissions.
a. True
5. Which command will run a program called logscript in the background?
c. logscript &
Lab 12.4 Finding Broken Links and Files with No Owners
Review Questions
1. When you’re the root user and you use the su command to become another
user, you must enter the user’s password.
b. False
2. Everyone can read and write unowned files that have -rw-rw----
permissions.
b. False
3. When you list files with the ls -l command, what appears in the user and
group owner columns for unowned files?
d. the UID and GID of the user that owned the file last
4. Which command displays all files that have no user owners in your entire
file system?
b. find / -nouser
5. Which command finds and displays broken (dangling) symbolic links in your
entire file system?
d. symlinks -r / |grep dangling
Lab 12.5 Understanding File Date and Time Stamps
Review Questions
1. When you open a file and read from it, which time is changed?
c. atime
2. When you modify a file’s contents, which time is changed?
d. all of the above
3. Which time is changed when you use the command touch file9?
d. all of the above
4. Which command will display mtime?
a. ls -l
5. If you change a file’s permissions (using chmod), which time is
changed?
a. ctime
Don't get your free email at hotmail.com
Use Open Source Software. http://www.gllug.org is much better.
More information about the linux-user
mailing list