Week 10 Comprehension Flashcards

1
Q

Match the level to the priority.
0=emergency
1=alert
2=critical
3=error
4=warning
5=notice

A

Match the level to the priority.
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
2
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
3
Q

What command do you use to display all the groups a user belongs to?

  • grep /etc/group
  • grep /etc/passwd
  • id
  • getent group | grep

(Select three)

A
  • grep /etc/group
  • id
  • getent group | grep
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What command do you use to add a user with the default home directory?

  • useradd -h
  • useradd -m
  • useradd -r
  • useradd -G
A

useradd -m

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
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
6
Q

Only the administrator can display the content of /etc/passwd
True
False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
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
8
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 = userid
Field 2 = password
Field 6 = home directory
Field 7 = shell

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
9
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
10
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
11
Q

In which of the following directories can you place files that will be copied to new user directories when new users are created?

a. /etc/rc.d
b. /etc/skel
c. /usr/local/template
d. /usr/local/useradd

A

You can place files into the /etc/skel directory that should be copied to new user directories when new users are created.

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

Which of the following commands can be used to delete a user account?

a. deluser
b. rmuser
c. userdel
d. expireuser

A

The userdel command can be used to delete a user from the Linux operating system.

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

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

The -f option for the usermod command allows you to specify the number of days until a user account with an expired password is disabled.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
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
15
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