Linux_FoundationLinux_Foundation
LFCS · Question #465
LFCS Question #465: Real Exam Question with Answer & Explanation
The correct answer is C: Changing the user's shell to /bin/false.. To temporarily suspend a user's ability to log in interactively, changing their default shell to /bin/false or /sbin/nologin is the best method.
Submitted by andreas_gr· Apr 18, 2026User and Group Management
Question
Of the ways listed, which is the best way to temporarily suspend a user's ability to interactively login?
Options
- AChanging the user's UID.
- BChanging the user's password.
- CChanging the user's shell to /bin/false.
- DRemoving the user's entry in /etc/passwd.
- EPlacing the command logout in the user's profile.
Explanation
To temporarily suspend a user's ability to log in interactively, changing their default shell to /bin/false or /sbin/nologin is the best method.
Common mistakes.
- A. Changing a user's UID would invalidate their file ownership and permissions, causing significant system issues beyond just suspending login.
- B. Changing the user's password would prevent them from logging in unless they are given the new password, which is not a 'temporary suspension' in the same controlled manner as changing the shell.
- D. Removing the user's entry in
/etc/passwdpermanently deletes the user account, which is not a temporary suspension. - E. Placing
logoutin a user's profile would still allow the user to initiate a login and their shell environment, which is less secure and less controlled than preventing shell execution altogether.
Concept tested. Suspending user interactive login
Reference. https://man7.org/linux/man-pages/man8/chsh.8.html
Topics
#User management#Account suspension#Interactive login#Shell configuration
Community Discussion
No community discussion yet for this question.