Of the ways listed, which is the best method to temporarily suspend a user’s ability to interactively login?

Of the ways listed, which is the best method to temporarily suspend a user’s ability to interactively login?
A . Use passwd -d username to give the user an empty password.
B . Use chage to expire the user account.
C . Change the user’s password.
D . Add the command exit to the user’s .login file.

Answer: B

Explanation:

The chage command can be used to change the expiration date of a user account. By setting the

expiration date to a past date, the user account will be disabled and the user will not be able to login

interactively. This is a temporary method, as the expiration date can be changed back to a future

date or removed to re-enable the user account. The other options are either permanent, insecure, or

ineffective. Option A is insecure, as it allows anyone to login as the user without a password. Option

C is permanent, as it changes the user’s password without saving the original one. Option D is

ineffective, as it only affects the user’s .login file, which is used by the csh and tcsh shells, and not by

other shells such as bash or zsh. Therefore, option B is the best method to temporarily suspend a

user’s ability to interactively login.

Reference:

https://linuxconfig.org/disabling-user-logins-to-linux-system

https://askubuntu.com/questions/282806/how-to-enable-or-disable-a-user

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