Module 10 Flashcards

1
Q

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
A
  • grep /etc/group
  • id
  • getent group | grep
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

Field 1 userid

Field 2 password

Field 6 home directory

Field 7 shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

0 emergency

1 alert

2 critical

3 error

4 warning

5 notice

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What command do you use to delete a user account along with his/her home directory?

  • userdel -h
  • userdel -m
  • userdel -r
  • userdel -G
A
  • userdel -r
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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
A
  • Renames log files with a numeric or date extension before creating a new one.
  • Older log files beyond the specified logging cycle are removed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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
A
  • Mount a USB drive for the user
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which commands could you use to (effectively) lock a user account? (Select three)

  • passwd -l
  • systemctl lock-user
  • usermod -L
  • usermod -s /sbin/nologin
A
  • passwd -l
  • usermod -L
  • usermod -s /sbin/nologin
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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)
A
Disable (7)
Accept (3)
Printing (9)
Reject (4)
Spooling (8)
Enable (6)
Ip (2)
cupsd (1)
/var/spool/cups (5)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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
A
  • ‘x’ means the actual password is saved in /etc/shadow
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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
A
  • One log file for almost all system services

- Uses journalctl to view/extract log entries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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
A
  • lp –d Printer1 file

- lp file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which command is used to delete a user account?

  • usermod –d username
  • del username
  • userdel username
  • rm username
A
  • userdel username
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the name of the utility used to rotate log files?

  • syslog
  • jetpack
  • logrotate
  • logbackup
A
  • logrotate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Most log files on the system are found in which directory?

  • /etc/logfiles
  • /etc/log
  • /var/log
  • /dev/log
A
  • /var/log
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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
A
  • cancel Printer1-17 Printer1-21
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

When a printer is rejecting requests,____________.

  • the print queue does not accept jobs and sends a message to the user noting that the printer is unavailable
  • the print queue does accept jobs into the print queue and holds them there until the printer is accepting requests again
  • the printer appears as offline when an lp request is sent
  • 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
17
Q

When a printer is disabled, ________.

  • the print queue does not accept jobs and sends a message to the user noting that the printer is unavailable
  • the print queue accepts jobs into the print queue and holds them there until the printer is enabled again
  • the printer appears as offline when an lp request is sent
  • the print queue redirects all print jobs sent to it to /dev/null
A
  • the print queue accepts jobs into the print queue and holds them there until the printer is enabled again
18
Q

UIDs and GIDs are unique to the system and, once used, can never be reused.

  • True
  • False
A
  • False
19
Q

You can lock a user account by changing the default login shell to an invalid shell in /etc/passwd.

  • True
  • False
A
  • True
20
Q

You can clear a log file simply by redirecting nothing into it. True or False?

  • True
  • False
A
  • True