Which of the following steps prevents a user from obtaining an interactive login session?

Which of the following steps prevents a user from obtaining an interactive login session?
A . Run the command chsh -s /bin/false with the user name.
B . Set the UID for the user to 0.
C . Remove the user from the group staff.
D . Add the user to /etc/noaccess.
E . Create a .nologin file in the user’s home directory.

Answer: A

Explanation:

Running the command chsh -s /bin/false with the user name will change the user’s login shell to /bin/false, which is a program that does nothing and returns a non-zero exit code. This means that the user will not be able to execute any commands or start an interactive shell session. This is a common way to disable a user’s login without disabling the account completely, which can be useful for users who only need to access the system via scp, sftp, or other non-interactive services. However, this method does not prevent the user from authenticating with the system, and it may not work with some services that do not rely on the login shell, such as ssh with a forced

command. Therefore, it is not a foolproof way to secure the system from unauthorized access.

Reference: 1234

Latest 102-500 Dumps Valid Version with 194 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments