121-130 Flashcards

1
Q

A systems administrator is tasked with setting up key-based SSH authentication. In which of the following locations should the administrator place the public keys for the server?

A. ~/.sshd/authkeys
B. ~/.ssh/keys
C. ~/.ssh/authorized_keys
D. ~/.ssh/keyauth

A

C. ~/.ssh/authorized_keys

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

A Linux administrator needs to create a new user named user02. However, user02 must be in a different home directory, which is under /comptia/projects. Which of the following commands will accomplish this task?

A. useradd -d /comptia/projects user02
B. useradd -m /comptia/projects user02
C. useradd -b /comptia/projects user02
D. useradd -s /comptia/projects user02

A

A. useradd -d /comptia/projects user02

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

One leg of an LVM-mirrored volume failed due to the underlying physical volume, and a systems administrator is troubleshooting the issue. The following output has been provided:

Partial mode. Incomplete volume groups will be activated read-only

LV|VG|Attr|LSize|Orgin|Snap%|Move|Log|Copy%|Devices

Linear|vg|-wi-a-|40.00G| | | | | |unknown device(0)

stripe|vg|-wi-a-|40.00G| | | | | |unknown device (5120), /dev/sda1 (0)

Given this scenario, which of the following should the administrator do to recover this volume?

A. Reboot the server. The volume will automatically go back to linear mode.
B. Replace the failed drive and reconfigure the mirror.
C. Reboot the server. The volume will revert to stripe mode.
D. Recreate the logical volume.

A

B. Replace the failed drive and reconfigure the mirror.

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

A systems administrator created a new Docker image called test. After building the image, the administrator forgot to version the release. Which of the following will allow the administrator to assign the v1 version to the image?

A. docker image save test test:v1
B. docker image build test:vl
C. docker image tag test test:vl
D. docker image version test:v1

A

C. docker image tag test test:vl

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

A Linux systems administrator receives a notification that one of the server’s filesystems is full. Which of the following commands would help the administrator to identify this filesystem?

A. lsblk
B. fdisk
C. df -h
D. du -ah

A

C. df -h

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

A systems administrator is notified that the mysqld process stopped unexpectedly. The systems administrator issues the following command:

sudo grep –i -r ‘out of memory’ /var/log
The output of the command shows the following:
kernel: Out of memory: Kill process 9112 (mysqld) score 511 or sacrifice child.

Which of the following commands should the systems administrator execute NEXT to troubleshoot this issue? (Select two).

A. free -h
B. nc -v 127.0.0.1 3306
C. renice -15 $( pidof mysql )
D. lsblk
E. killall -15
F. vmstat -a 1 4

A

A. free -h

C. renice -15 $( pidof mysql )

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

Users have reported that the interactive sessions were lost on a Linux server. A Linux administrator verifies the server was switched to rescue.target mode for maintenance. Which of the following commands will restore the server to its usual target?

A. telinit 0
B. systemctl reboot
C. systemctl get-default
D. systemctl emergency

A

B. systemctl reboot

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

A systems administrator was tasked with assigning the temporary IP address/netmask 192.168.168.1/255.255.255.255 to the interface eth0 of a Linux server.
When adding the address, the following error appears:
# ip address add 192.168.168.1/33 dev eth0
Error: any valid prefix is expected rather than “192.168.168.1/33”.
Based on the command and its output above, which of the following is the cause of the issue?

A. The CIDR value /33 should be /32 instead.
B. There is no route to 192.168.168.1/33.
C. The interface eth0 does not exist.
D. The IP address 192.168.168.1 is already in use.

A

C. The interface eth0 does not exist.

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

A Linux user reported the following error after trying to connect to the system remotely: ssh: connect to host 10.0.1.10 port 22: Resource temporarily unavailable
The Linux systems administrator executed the following commands in the Linux system while trying to diagnose this issue:

netstat -an | grep 22 | grep LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN

firewall-cmd –list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0
sources:
services: dhcpv6-client
prots:
protocols:
masquerage: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:

Which of the following commands will resolve this issue?

A. firewall-cmd –zone=public –permanent –add-service=22
B. systemctl enable firewalld; systemctl restart firewalld
C. firewall-cmd –zone=public –permanent –add-service=ssh
D. firewall-cmd –zone=public –permanent –add-port=22/udp

A

C. firewall-cmd –zone=public –permanent –add-service=ssh

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

A Linux administrator has been tasked with installing the most recent versions of packages on a RPM-based OS. Which of the following commands will accomplish this task?

A. apt-get upgrade
B. rpm -a
C. yum updateinfo
D. dnf update
E. yum check-update

A

D. dnf update

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