15.3.4 - Login Blocking (Practice Questions)
auth requisite pam_nologin.so
Login blocking is enabled using the Pluggable Authentication Modules (PAM) module. What line needs to be in the /etc/pam.d/login file to configure PAM to check and see if a file named / etc/nologin exists?
touch /etc/nologin
PAM is configured on your system to look for the presence of the nologin file in the /etc directory. If the nologin file exists, user login is disabled, and only the root user can log in. If your current working directory is root's home directory, which command would you enter to quickly create an empty nologin file in the /etc directory?
/etc/nologin
What is the full path and filename of the file you should create to disable user login on a Linux system?
/etc/pam.d/login
Which configuration file should you edit to enable Pluggable Authentication Modules (PAM) to check for a file named /etc/nologin?
w
You need to block all users from logging in to the Linux system while you resolve a serious issue. You first need to force all active users to logout. What the command should you enter to display a list of all active users?