CH 10 Common Administrative Tasks
Which of the following will allow the root user to display the contents of the /etc/shadow file? (Choose all that apply.) a) cat /etc/shadow b) getent shadow c) shadowls d) sudocat /etc/shadow
a) cat /etc/shadow b) getent shadow
Which of the following entries could be added to the rsyslog.conf configuration file to ensure that network login events of warning priority and more serious are logged immediately to the /var/log/logins file? a) auth.warn -/var/log/logins b) authpriv.warn -/var/log/logins c) authpriv.=warning /var/log/logins d) auth.=warn /var/log/logins
b) authpriv.warn -/var/log/logins
Julius would like to ensure that his default printer is different than the system default printer. Which line can he add to his ~/.bash_profile to set his default printer to printer5? (Choose two.) a) export PRINT=printer5 b) export PRINTER=printer5 c) export LPDEFAULT=printer5 d) export LPDEST=printer5
b) export PRINTER=printer5 d) export LPDEST=printer5
Which command can be used to display messages from the MySQL daemon between 10:00 am and 10:15 am today? (Choose all that apply.) a) journalctl --range "10:00-10:15" mysqld.service b) journalctl _COMM=mysqld --since "10:00" --until "10:15" c) journalctl --unit mysqld.service --range "10:00-10:15" d) journalctl --unit mysqld.service --since "10:00" --until "10:15"
b) journalctl _COMM=mysqld --since "10:00" --until "10:15" d) journalctl --unit mysqld.service --since "10:00" --until "10:15"
UIDs and GIDs are unique to the system and, once used, can never be reused. a. True b. False
b. False
Which of the following commands can be used to delete a user account? a) deluser b) rmuser c) userdel d) expireuser
c) userdel
Which of the following is a special group that provides its members with the ability to run commands as the root user via the sudo command on Fedora Linux systems? a) sudoers b) adm c) wheel d) sys
c) wheel
Which 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
c. /etc/login.defs
Most log files on the system are found in which directory? a. /etc/logfiles b. /etc/log c. /var/log d. /dev/log
c. /var/log
What is the name of the utility used to rotate log files? a. syslog b. jetpack c. logrotate d. logbackup
c. logrotate
Uli administers a Linux print server on the network. The printer named printer5 on the print server has experienced a hardware failure and Uli wants to let users immediately know that the printer is unavailable should they attempt to submit a print job. What command should Uli run? a) cupsreject -r "Unavailable. Please submit your job to another printer" printer5 b) cupsdisable -r "Unavailable. Please submit your job to another printer" printer5 c) cupsreject -m "Unavailable. Please submit your job to another printer" printer5 d) cupsdisable -m "Unavailable. Please submit your job to another printer" printer5
a) cupsreject -r "Unavailable. Please submit your job to another printer" printer5
What is the name of the file that contains a listing of all users on the system and their home directories? a. /etc/passwd b. /etc/users c. /etc/shadow d. /etc/password
a. /etc/passwd
Which command can be used to send a print job to the default printer named Printer1? (Choose all that apply.) a. lp -d Printer1 file b. lp Printer1 file c. lp file d. lp -m Printer1 file
a. lp -d Printer1 file c. lp file
Kisha manages a Linux file server that contains user accounts for all of the users in her organization. She would like to ensure that when new user accounts are created, an introduction.txt file is automatically copied to their home directory. In which of the following directories can Kisha place the introduction.txt such that it will be copied to new user home directories? a) /etc/rc.d b) /etc/skel c) /etc/login.defs.d/template d) /etc/default/useradd
b) /etc/skel
Which protocol does CUPS use to share printers to client computers on the network by default? a) SMB b) IPP c) LPD d) LPR
b) IPP
What command can you use to view journald log entries on a system that uses Systemd? a. less b. journalctl c. syslog d. catlog
b. journalctl
When a printer is disabled, _____. a. the print queue does not accept jobs and sends a message to the user noting that the printer is unavailable b. the print queue accepts jobs into the print queue and holds them there until the printer is enabled again c. the printer appears as offline when an lp request is sent d. the print queue redirects all print jobs sent to it to /dev/null
b. the print queue accepts jobs into the print queue and holds them there until the printer is enabled again
Which of the following options can be used with the usermod command to change the description of the user account that is stored in the GECOS field? a) -g b) -d c) -c d) -s
c) -c
Which of the following log files contains information and error messages generated by the Linux kernel? a) /var/log/wtmp b) /var/log/dmesg c) /var/log/kern.log d) /var/log/secure
c) /var/log/kern.log
Which of the following will show account aging information for a user such as the date of the last password change, when the password expires, and the number of days of warning before the password expires? a) usermod --expiry jsmith b) chage -u jsmith c) chage -l jsmith d) lsuser jsmith
c) chage -l jsmith
Which of the following commands can be used to remove a group from a Linux system? a) rmgroup b) rmg c) groupdel d) groups
c) groupdel
Yasir has been tasked with setting up a new Linux print server in his organization. He has installed CUPS and would like to access the CUPS web administration tool to complete the configuration. What URL should Yasir use within a web browser to access this tool? a) http://servername b) http://servername/cups c) http://servername:631 d) http://servername/ipp
c) http://servername:631
Which of the following two commands can be used to add custom log file entries to the journald database? (Choose two.) a) logentry b) mklog c) systemd-cat d) logger e) systemd-make
c) systemd-cat d) logger
Which command would you use to unlock a user account? a. unlock username b. open username c. passwd -u username d. useradd -U username
c. passwd -u username
Which command is used to delete a user account? a. usermod -d username b. del username c. userdel username d. rm username
c. userdel username
Which command can you use to lock a user account? a. lock username b. secure username c. usermod -L username d. useradd -L username
c. usermod -L username
The System Log Daemon, rsyslogd, creates a socket for other system processes to write to. What is the path to this socket? a) /tmp/log b) /var/log.sock c) /etc/rsyslog.socket d) /dev/log
d) /dev/log
Which of the following commands can be used to prevent a printer named Printer1 from sending print jobs in the print queue to the printer? a) cupsreject -p Printer1 b) cupsdisable -c Printer1 c) cupsreject Printer1 d) cupsdisable Printer1
d) cupsdisable Printer1
What is the term used to describe a user providing a user name and password to log in to a system? a. validation b. authorization c. login d. authentication
d. authentication
When referring to the /etc/rsyslog.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
d. facility, priority
Which command can be used to temporarily alter the primary group associated with a given user? a. usermod b. chggrp c. gpasswd d. newgrp
d. newgrp
The process of sending print jobs from the print queue to the printer is called _____. a. spooling b. queuing c. redirecting d. printing
d. printing
Laverne has recently been assigned to manage a Linux server in her organization that uses the System Log Daemon. She wishes to learn more about where events are logged. In which locations should Laverne look? (Choose all that apply.) a) /etc/rsyslog.conf b) /etc/syslog.conf c) /etc/rsyslog.d/* d) /etc/rsyslog.rules
a) /etc/rsyslog.conf b) /etc/syslog.conf c) /etc/rsyslog.d/*
You want to limit the size of the journald database, overwriting events as needed. What file must you modify to specify a maximum database size? a) /etc/systemd/journald.conf b) /etc/journald/journald.conf c) /etc/rsyslogd/journald.conf d) /etc/rsyslog/journald.conf
a) /etc/systemd/journald.conf
Which of the following files stores information about failed logins on a Linux system? a) /var/log/btmp b) /var/log/wtmp c) /var/log/nolo d) /var/log/failed
a) /var/log/btmp
Which of the following log files under the /var/log directory contain security-related events? (Choose all that apply.) Which of the following log files under the /var/log directory contain security-related events? (Choose all that apply.) a) btmp b) secure c) auth.log d) yum.log
a) btmp b) secure c) auth.log
You can clear a log file simply by redirecting nothing into it. a. True b. False
a. True
Which of the following commands can you use to send a print job to printer1? (Choose all that apply.) a) lp -d printer1 mydocument.txt b) lpr -d printer1 mydocument.txt c) lpr -P printer1 mydocument.txt d) lp -p printer1 mydocument.txt
a) lp -d printer1 mydocument.txt c) lpr -P printer1 mydocument.txt
Which of the following commands will display the print jobs in the print queue for printer1 only? a) lpstat -o printer1 b) lpq -d printer1 c) lpq -p printer1 d) lp -j printer1
a) lpstat -o printer1
Emily accidentally created a new user account named bparsons on the wrong server. Which of the following commands could she use to delete the account she created as well as the associated home directory? (Choose all that apply.) a) userdel bparsons ; rm -rf /home/bparsons b) userdel bparsons c) userdel -h bparsons d) userdel -r bparsons
a) userdel bparsons ; rm -rf /home/bparsons d) userdel -r bparsons
Which of the following commands can be used to set the number of days until user account jsmith with an expired password is disabled? a) usermod -f 15 jsmith b) usermod -d 15 jsmith c) usermod -x 15 jsmith d) usermod -e 15 jsmith
a) usermod -f 15 jsmith
You can lock a user account by changing the default login shell to an invalid shell in /etc/passwd. a. True b. False
a. True
You use lpstat 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 IDs of Printer1-17 and Printer1-21, respectively. Which command would you use to remove these two jobs from the print queue? a. cancel Printer1-17 Printer1-21 b. cancel -u Printer1-17 Printer1-21 c. cancel -a Printer1-17 Printer1-21 d. cancel 17 21
a. cancel Printer1-17 Printer1-21
When a printer is rejecting requests, _____. a. the print queue does not accept jobs and sends a message to the user noting that the printer is unavailable b. the print queue accepts jobs into the print queue and holds them there until the printer is accepting requests again c. the printer appears as offline when an lp request is sent d. the print queue redirects all print jobs sent to it to /dev/null
a. the print queue does not accept jobs and sends a message to the user noting that the printer is unavailable
Which of the following commands can be used to set the default printer to printer1 for all users on a Linux system? a) lp -d printer1 b) lpoptions -d printer1 c) lpd -d printer1 d) lpq --set-default printer1
b) lpoptions -d printer1
Which of the following is the first field of the /etc/passwd file? a) UID b) username c) GECOS d) GID
b) username
Along with a listing of user accounts, the /etc/passwd file contains information on account expiry. a. True b. False
b. False
