CompTIA
XK0-005 · Question #1622
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…
The correct answer is D. chsh -s /bin/false www-data && chsh -s /bin/false db. 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 system. This will prevent unauthorized access attempts and improve security.
Security
Question
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?
Options
- Ausermod -d /srv/www-data www-data && usermod -d /var/lib/db db
- Bpasswd -u www-data && passwd -u db
- Crenice -n 1002 -u 502 && renice -n 1005 -u 505
- Dchsh -s /bin/false www-data && chsh -s /bin/false db
How the community answered
(55 responses)- A13% (7)
- B4% (2)
- C7% (4)
- D76% (42)
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 system. This will prevent unauthorized access attempts and improve security.
Topics
#User Management#Security Hardening#Shells#System Accounts
Community Discussion
No community discussion yet for this question.