Module 10 Common Administrative Tasks
Most log files on the system are found in which directory?
/var/log
The login data is retrieved from the latest ________ file.
/var/log/wtmp
Which value will force immediate password expiration for a user account?
0
User Identifier (UID)
A unique number assigned to each user account.
Group Identifier (GID)
A unique number given to each group.
print job ID
A unique numeric identifier used to mark and distinguish each print job.
lpstat -a
Displays a list of printers that are accepting print jobs
True or False: Along with a listing of user accounts, the /etc/passwd file contains information on account expiry.
False
True or False: UIDs and GIDs are unique to the system and, once used, can never be reused
False
Which of the following section in the /etc/rsyslog.conf file contains information that apply to the rsyslogd daemon and start with $?
Global Directives
What function does the usermod -U (username) perform?
It unlocks the account
groups command
Lists group membership for a user.
id command
Lists the UID and GIDs for a user.
When you create a user with the useradd command, what is the immediate state of it?
Locked
To perform administrative tasks using the Web interface, you must use the root account. An alternative is to add the user to the _________ group.
Lpadmin
Which section of the /etc/rsyslog.conf file contains various configuration directives that are loaded when the module is loaded?
Modules
True or False: You can clear a log file simply by redirecting nothing into it.
True
True or False: You can lock a user account by changing the default login shell to an invalid shell in /etc/passwd.
True
groupadd command
Used to add a group to the system.
useradd command
Used to add a user account to the system.
cupsaccept
Used to allow a printer to accept jobs into the print queue.
cupsenable
Used to allow print jobs to leave the print queue
chsh command
Used to change a valid shell to an invalid shell.
chfn command
Used to change the GECOS for a user.
lp command
Used to create print jobs in the print queue in the CUPS printing system.
Which command would you use to unlock a user account?
passwd -u username
What command should be issued to change a Linux system such that it will use the /etc/shadow file to store user passwords?
pwconv
primary group
the group that is made the group owner of any file or directory that the user creates.
Which command is used to delete a user account?
userdel username
Which command should you use to add a user to the plabuser group?
usermod
Which command can you use to lock a user account?
usermod -L username
Which command displays the name of the current logged in user?
whoami
lpstat -p
Displays a list of printers that are enabled
lpstat -d
Displays the default destination printer
lpstat -o printername
Displays the print jobs in the print queue for printername only
The process of sending print jobs from the print queue to the printer is called _____.
Printing
What is the default state of the cupsd.conf file?
Read-only for everyone
In the /etc/rsyslog.conf file, which of the following are examples of Facility?
Security Kernel
lpstat -t
Shows all information about printers and their print jobs
lpstat -s
Shows printer and printer status information
lpstat -r
Shows whether the CUPS daemon (scheduler) is running
Which of the following keys should be pressed after typing the journalctlcommand in order to see a list of areas and criteria that can be queried?
Tab
facility
The area of the system from which information is gathered when logging system events.
CUPS daemon (cupsd)
The daemon responsible for printing in the CUPS printing system.
System Log Daemon (rsyslogd)
The daemon that logs system events to various log files via information stored in /etc/rsyslog.conf and files within the /etc/rsyslog.d directory.
General Electric Comprehensive Operating System (GECOS)
The field in the /etc/passwd file that contains a description of the user account.
priority
The importance of system information when logging system events.
user account
The information regarding a user that is stored in a system database (/etc/passwd and /etc/shadow), which can be used to log in to the system and gain access to system resources.
print job
The information sent to a printer for printing.
When a user is deleted and a new user is created using the same UID, what is the status of the files owned by the previous user?
The new user becomes the owner
Common Unix Printing System (CUPS)
The printing system commonly used on Linux computers.
spooling / queuing
The process of accepting a print job into a print queue.
lock an account
To make an account temporarily unusable by altering the password information for it stored on the system.
lpr command
Used to create print jobs in the print queue in the LPD printing system.
systemd-cat command
Used to create system log entries in the journald database.
logger command
Used to create system log entries.
groupdel command
Used to delete a group from the system.
pwunconv command
Used to disable the use of the /etc/shadow file.
getent command
Used to display the entries within system databases, such as /etc/passwd, /etc/shadow, and /etc/group.
pwconv command
Used to enable the use of the /etc/shadow file.
cupsreject
Used to force a printer to reject jobs from entering the print queue.
chage command
Used to modify password expiry information for user accounts.
groupmod command
Used to modify the name or GID of a group on the system.
usermod command
Used to modify the properties of a user account on the system.
lpadmin command
Used to perform printer administration in the CUPS printing system.
cupsdisable command
Used to prevent print jobs from leaving the print queue.
userdel command
Used to remove a user account from the system.
cancel command
Used to remove print jobs from the print queue in the CUPS print system.
lprm command
Used to remove print jobs from the print queue in the LPD printing system.
logrotate command
Used to rotate log files; typically uses the configuration information stored in /etc/logrotate.conf.
newgrp command
Used to temporarily change the primary group of a user.
lpstat command
Used to view the contents of print queues and printer information in the CUPS printing system.
lpq command
Used to view the contents of print queues in the LPD printing system.
lpc command
Used to view the status of, and control printers in, the LPD printing system.
CUPS gets its directives from its configuration file, which is /etc/cups/__________.
cupsd.conf
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.
facility, priority
What command can you use to view journald log entries on a system that uses Systemd?
journalctl
Which process is used for logging events from the kernel?
klogd
Which of the following processes are part of the syslog service?
klogd rsyslogd
To determine the recent logins on your system, which command should you use?
last
Which command should you use to find the last login for each individual on a system?
lastlog
Most daemons record information and error messages to files stored on the filesystem and are refered to as:
log files (are typically stored in the /var/log directory)
Which of the following information is displayed with the who command?
logged in users current run level of the system time of the last system boot.
What is the name of the utility used to rotate log files?
logrotate
What command allows a Linux client to print to a Linux-based print queue?
lp
Which command can be used to send a print job to the default printer named Printer1?
lp -d Printer1 file lp file
Which of the following commands can be used to view print jobs in the print queue, much like the lpstatcommand?
lpq
What are the differences between the cat and ls utilities, with respect to file content?
ls without any arguments will return a file name and thus it does not directly read a content of the file. Whereas cat will return a content of a file.
Which command will help you determine the services that are running on specific ports?
netstat
What command should be issued to temporarily change the primary group associated with a user account?
newgrp
Which command can be used to temporarily alter the primary group associated with a given user?
newgrp
Without arguments, the ____________ command changes the password for the current user.
passwd
When a printer is rejecting requests,____________
the device queue does not accept jobs and sends a message to the user noting that the printer is unavailable
When a printer is disabled, ________.
the print queue accepts jobs into the print queue and holds them there until the printer is enabled again
What argument do you use with the usermod command to add a user to a group
- G
To count the number of users logged in to the system, which parameters of the who command should be used?
-q -H
To display the current runlevel of the system, which parameter of the who command should be used?
-r
To display the list of users logged in to the system, which parameter of the who command should be used?
-u
In which file on a Linux system are the configuration settings for a printer stored?
/etc/cups/printers.conf
Which file contains default information such as UID and GID ranges and minimum password length to be used at user creation?
/etc/login.defs
Which directory contains files that are copied to all new users' home directories when the home directory is created?
/etc/skel
Which file should you edit to change the default port for SSH?
/etc/ssh/sshd_config
Which value of chmod will make the cupsd.conf file read-only?
444
What is the default port used by the Web Interface?
631
By default, what is the time period a user is warned before their password expires on a Red Hat Fedora system?
7 days
Systemd Journal Daemon (journald)
A Systemd component that logs system events to a journal database.
CUPS Web administration tool
A Web-based management tool for the CUPS printing system.
print queue
A directory on the filesystem that holds print jobs that are waiting to be printed.
skeleton directory
A directory that contains files that are copied to all new users' home directories upon creation; the default skeleton directory on Linux systems is /etc/skel.
Printers tool
A graphical utility used to configure printers on a Fedora system.
printer classes
A group of CUPS printers that are treated as a single unit for the purposes of printing and management.
Internet Printing Protocol (IPP)
A printing protocol that can be used to send print jobs across a TCP/IP network, such as the Internet, using HTTP or HTTPS.
Line Printer Daemon (LPD)
A printing system typically used on legacy Linux computers.
agent
A software component that is installed on a Linux system that communicates to another computer across the network.
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?
cancel Printer1-17 Printer1-21
Which command is used to change the user password expiration information?
change