Module 10 Flashcards
What command do you use to display all the groups a user belongs to? (Select three)
- grep /etc/group
- grep /etc/passwd
- id
- getent group | grep
- grep /etc/group
- id
- getent group | grep
Find the match for the fields in /etc/passwd.
getent user1 passwd
user1:x:1000:1000:Adam Smith:/home/user1:/bin/bash
Field 1
Field 2
Field 6
Field 7
Field 1 userid
Field 2 password
Field 6 home directory
Field 7 shell
Although not described in the textbook, syslog has numeric severity levels defined in RFC 3164.
Match the level to the priority.
0
1
2
3
4
5
0 emergency
1 alert
2 critical
3 error
4 warning
5 notice
What command do you use to delete a user account along with his/her home directory?
- userdel -h
- userdel -m
- userdel -r
- userdel -G
- userdel -r
Which statements describe logrotate? (Select two)
- Run by atd
- Run monthly
- Renames log files with a numeric or date extension before creating a new one.
- Older log files beyond the specified logging cycle are removed
- Renames log files with a numeric or date extension before creating a new one.
- Older log files beyond the specified logging cycle are removed
Which one is NOT a step in setting up a user account on a Linux system?
- Create an account with the user’s home directory
- Set the initial password
- Associate the user to groups
- Mount a USB drive for the user
- Mount a USB drive for the user
Which commands could you use to (effectively) lock a user account? (Select three)
- passwd -l
- systemctl lock-user
- usermod -L
- usermod -s /sbin/nologin
- passwd -l
- usermod -L
- usermod -s /sbin/nologin
Find the match.
2019-12-10 (2).png
Disable (7) Accept (3) Printing (9) Reject (4) Spooling (8) Enable (6) Ip (2) cupsd (1) /var/spool/cups (5)
Disable (7) Accept (3) Printing (9) Reject (4) Spooling (8) Enable (6) Ip (2) cupsd (1) /var/spool/cups (5)
Why does everyone have ‘x’ in the password field of /etc/passwd file?
- It is a sign that /etc/passwd file has been corrupted
- ‘x’ indicates there is an error in the account settings
- ‘x’ means the actual password is saved in /etc/shadow
- ‘x’ signifies that the account is locked
- ‘x’ means the actual password is saved in /etc/shadow
Which describe journald? (Select two)
- Text log
- One log file for almost all system services
- Uses journalctl to view/extract log entries
- Older logging daemon
- One log file for almost all system services
- Uses journalctl to view/extract log entries
Which command can be used to send a print job to the default printer named Printer1? (Choose all that apply.)
- lp –d Printer1 file
- lp Printer1 file
- lp file
- lp –m Printer1 file
- lp –d Printer1 file
- lp file
Which command is used to delete a user account?
- usermod –d username
- del username
- userdel username
- rm username
- userdel username
What is the name of the utility used to rotate log files?
- syslog
- jetpack
- logrotate
- logbackup
- logrotate
Most log files on the system are found in which directory?
- /etc/logfiles
- /etc/log
- /var/log
- /dev/log
- /var/log
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
- cancel –u Printer1-17 Printer1-21
- cancel –a Printer1-17 Printer1-21
- cancel 17 21
- cancel Printer1-17 Printer1-21