Question 210
A Linux infrastructure team needs the safest targeted response to this condition: A developer stores a privileged password inside a shell script committed to Git. What is the most appropriate targeted action?
Explanation
Correct Answer
Deleting a line in HEAD does not erase existing Git history copies. This action corrects the relevant condition. Verify that the old password is revoked and scripts obtain the current secret securely.
Incorrect Answers
That remedy is appropriate when a system stores a service login with a password hash but policy demands no interactive login. It targets /sbin/nologin prevents a normal interactive shell even if an account exists; here deleting a line in HEAD does not erase existing Git history copies, so it does not directly repair the observed fault.
This change addresses a deployment uses a predictable default administrative password on every appliance. The present problem is different: deleting a line in HEAD does not erase existing Git history copies. Applying the alternative would leave the key cause unresolved.
It would correct a separate failure, a privileged account uses a password that appeared in a known breach dataset. In this environment, deleting a line in HEAD does not erase existing Git history copies; the indicated alternative does not meet the acceptance test.





CompTIA Linux+ (XK0-006) Practice Tests