Week 10 Comprehension Flashcards
Match the level to the priority.
0=emergency
1=alert
2=critical
3=error
4=warning
5=notice
Match the level to the priority.
0=emergency
1=alert
2=critical
3=error
4=warning
5=notice
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
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)
- grep /etc/group
- id
- getent group | grep
What command do you use to add a user with the default home directory?
- useradd -h
- useradd -m
- useradd -r
- useradd -G
useradd -m
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)
Only the administrator can display the content of /etc/passwd
True
False
False
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
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
Field 1 = userid
Field 2 = password
Field 6 = home directory
Field 7 = shell
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 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
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
You can place files into the /etc/skel directory that should be copied to new user directories when new users are created.
Which of the following commands can be used to delete a user account?
a. deluser
b. rmuser
c. userdel
d. expireuser
The userdel command can be used to delete a user from the Linux operating system.
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
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.
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
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