221-230 Flashcards

1
Q

A Linux user is trying to execute commands with sudo but is receiving the following error:

$ sudo visudo
»> /etc/sudoers: syntax error near line 28 «<
sudo: parse error in /etc/sudoers near line 28
sudo: no valid sudoers sources found, quitting

The following output is provided:

grep root /etc/shadow
root:LOCK:14600::::::

Which of the following actions will resolve this issue?

A. Log in directly using the root account and comment out line 28 from /etc/sudoers.
B. Boot the system in single user mode and comment out line 28 from /etc/sudoers.
C. Comment out line 28 from /etc/sudoers and try to use sudo again.
D. Log in to the system using the other regular user, switch to root, and comment out line 28 from /etc/sudoers.

A

B. Boot the system in single user mode and comment out line 28 from /etc/sudoers.

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

Users are experiencing high latency when accessing a web application served by a Linux machine. A systems administrator checks the network interface counters and sees the following:

ip -s link list dev enp0s25

2: enp0s25: <BROADCST,MULTICAST,LOWER_UP,UP> mtu 1500 qdisc fq_code1 state DOWN mode DEFAULT group default qlen 1000 link/ether ac:12:34:56:78:cd brd ff:ff:ff:ff:ff:ff

RX: bytes|packets|errors|dropped|missed|mcast
2011664755|3579033|2394390|508|0|0

TX: bytes|packets|errors|dropped|carrier|collsns
309541780|1705408|0|0|12340|0

Which of the following is the most probable cause of the observed latency?

A. The network interface is disconnected.
B. A connection problem exists on the network interface.
C. No IP address is assigned to the interface.
D. The gateway is unreachable.

A

B. A connection problem exists on the network interface.

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

A Linux administrator needs to create a symlink for /usr/local/bin/app-a, which was installed in /usr/local/share/app-a. Which of the following commands should the administrator use?

A. ln -s /usr/local/bin/app-a /usr/local/share/app-a
B. mv -f /usr/local/share/app-a /usr/local/bin/app-a
C. cp -f /usr/local/share/app-a /usr/local/bin/app-a
D. rsync -a/usr/local/share/app-a /usr/local/bin/app-a

A

A. ln -s /usr/local/bin/app-a /usr/local/share/app-a

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

The applications team is reporting issues when trying to access the web service hosted in a Linux system. The Linux systems administrator is reviewing the following outputs:

Output 1:

  • httpd.service = The Apache HTTPD Server
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset; disabled)
    Active: inactive (dead)
    Docs: man:httpd(8)
    man:apachectl(8)

Output 2:

16:51:16 up 28 min, 1 user, load average: 0.00, 0.00, 0.07

Which of the following statements best describe the root cause? (Choose two.)

A. The httpd service is currently started.
B. The httpd service is enabled to auto start at boot time, but it failed to start.
C. The httpd service was manually stopped.
D. The httpd service is not enabled to auto start at boot time.
E. The httpd service runs without problems.
F. The httpd service did not start during the last server reboot.

A

D. The httpd service is not enabled to auto start at boot time.

F. The httpd service did not start during the last server reboot.

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

Which of the following specifications is used to perform disk encryption in a Linux system?

A. LUKS
B. TLS
C. SSL
D. NFS

A

A. LUKS

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

A junior developer is unable to access an application server and receives the following output:

[root@server1 ~]# ssh dev2@172.16.25.126
dev2@172.16.25.126’s password:
Permission denied, please try again.
dev2@172.16.25.126’s password:
Permission denied, please try again.
dev2@172.16.25.126’s password:
Account locked due to 4 failed logins
Account locked due to 5 failed logins
Last login: Mon Apr 22 21:21:06 2021 from 172.16.16.52

The systems administrator investigates the issue and receives the following output:

[root@server1 ~]# pam_tally2 –user=dev2
Login Failures Latest failure From
dev2 5 04/22/21 21:22:37 172.16.16.52

Which of the following commands will help unlock the account?

A. pam_tally2 –user=dev2 –quiet
B. pam_tally2 –user=dev2
C. pam_tally2 –user+dev2 –quiet
D. pam_tally2 –user=dev2 –reset

A

D. pam_tally2 –user=dev2 –reset

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

A systems technician is configuring an application server to accept packets from a trusted source with the IP address 192.168.10.22. Which of the following commands will allow communication between the two servers?

A. iptables -L -s 192.168.10.22 -j ACCEPT
B. iptables -D INPUT -s 192.168.10.22 -j ACCEPT
C. iptables -A INPUT -s 192.168.10.22 -j ACCEPT
D. iptables -A OUTPUT -s 192.168.10.22 -j ACCEPT

A

C. iptables -A INPUT -s 192.168.10.22 -j ACCEPT

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

An administrator needs to increase the system priority of a process with PID 2274. Which of the following commands should the administrator use to accomplish this task?

A. renice -n -15 2274
B. nice -15 2274
C. echo “-15” > /proc/PID/2274/priority
D. ps -ef | grep 2274

A

A. renice -n -15 2274

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

A Linux administrator is creating a new sudo profile for the accounting user. Which of the following should be added by the administrator to the sudo configuration file so that the accounting user can run /opt/acc/report as root?

A. accounting localhost=/opt/acc/report
B. accounting ALL=/opt/acc/report
C. %accounting ALL=(ALL) NOPASSWD: /opt/acc/report
D. accounting /opt/acc/report=(ALL) NOPASSWD: ALL

A

B. accounting ALL=/opt/acc/report

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

An administrator needs to make an application change via a script that must be run only in console mode. Which of the following best represents the sequence the administrator should execute to accomplish this task?

A.
systemctl isolate multi-user.target
sh script.sh
systemctl isolate graphical.target

B.
systemctl isolate graphical.target
sh script.sh
systemctl isolate multi-user.target

C.
sh script.sh
systemctl isolate multi-user.target
systemctl isolate graphical.target

D.
systemctl isolate multi-user.target
systemctl isolate graphical.target
sh script.sh

A

A.
systemctl isolate multi-user.target
sh script.sh
systemctl isolate graphical.target

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