ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 256 - XK0-005 discussion

Report
Export

A Linux engineer finds multiple failed login entries in the security log file for application users. The Linux engineer performs a security audit and discovers a security issue. Given the following:

# grep -iE '*www*|db' /etc/passwd

www-data:x:502:502:www-data:/var/www:/bin/bash

db:x: 505:505:db: /opt/db:/bin/bash

Which of the following commands would resolve the security issue?

A.
usermod -d /srv/www-data www-data && usermod -d /var/lib/db db
Answers
A.
usermod -d /srv/www-data www-data && usermod -d /var/lib/db db
B.
passwd -u www-data && passwd -u db
Answers
B.
passwd -u www-data && passwd -u db
C.
renice -n 1002 -u 502 && renice -n 1005 -u 505
Answers
C.
renice -n 1002 -u 502 && renice -n 1005 -u 505
D.
chsh -s /bin/false www-data && chsh -s /bin/false db
Answers
D.
chsh -s /bin/false www-data && chsh -s /bin/false db
Suggested answer: D

Explanation:

This command will use the chsh tool to change the login shell of the users www-data and db to /bin/false, which means they will not be able to log in to the system1. This will prevent unauthorized access attempts and improve security.

asked 02/10/2024
Ivan Mazala
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first