102-500 Exam QuestionsBrowse all questions from this exam

102-500 Exam - Question 55


FILL BLANK -

The presence of what file will temporarily prevent all users except root from logging into a system? (Specify the full name of the file, including path.)

Show Answer
Correct Answer:

The presence of the file /etc/nologin will temporarily prevent all users except the root user from logging into a system. This file may contain a message to notify users why they cannot log in. When this file is present, login attempts by non-root users are denied with the content of the file shown to the user, if any, while root is still able to log in. This is a commonly used method to temporarily restrict system access during maintenance.

Discussion

17 comments
Sign in to comment
bogvt
Feb 16, 2020

Wrong answer. The right answer is /etc/nologin

mustache
Aug 19, 2020

it is a symbolic link to /sbin/nologin...

drliu1202
Aug 11, 2022

/etc/nologin is not a symbolic link. "What happens on login, when the file /etc/nologin contains this line of text login currently is not possible only? The message login currently is not possible will be shown, and a login is prevented." https://learning.lpi.org/en/learning-materials/102-500/110/110.2/110.2_01/#:~:text=logins%20are%20prevented.-,What%20happens%20on%20login%2C%20when%20the%20file%20/etc/nologin%20contains,not%20possible%20will%20be%20shown%2C%20and%20a%20login%20is%20prevented.,-May%20an%20ordinary

aianovskii
Feb 25, 2020

yep /etc/nologin NOT /sbin/nologin

Erwinator
Sep 28, 2020

Just test it, if you create /etc/nologin you can only login with root

iwkno6
Aug 27, 2021

Agreed that it is /etc/nologin, as the sbin one is always there. To confirm create a nologin file in /etc and lock and try to log back in.

anhcq
Dec 3, 2021

To prevent all users except the root user from logging into the system temporarily, the superuser may create a file named /etc/nologin. This file may contain a message to the users notifying them as to why they can not login (for example, system maintenance notifications). For details see man 5 nologin. ref: https://learning.lpi.org/en/learning-materials/102-500/110/110.2/110.2_01/

marenco
Mar 25, 2022

To prevent all users except the root user from logging into the system temporarily, the superuser may create a file named /etc/nologin. This file may contain a message to the users notifying them as to why they can not login (for example, system maintenance notifications). so the answer is /etc/nologin

Lazylinux
Apr 27, 2022

yep /etc/nologin

KAYA2202
Jul 27, 2022

/etc/nologin

Thi_86
Aug 31, 2020

"/etc/nologin" it's correct.

Vendo
Sep 11, 2020

The question is a bit too general... /etc/nologin. creating this we could write the reason as a message /sbin/nologin. is always there, but not active until you change the shell of a user and then /run/nologin for SSH connections. does exactly that what the question asks

McLaba
Apr 23, 2021

When /sbin/nologin is set as the shell, if user with that shell logs in, they'll get a polite message saying 'This account is currently not available.' This message can be changed with the file /etc/nologin.txt.

McLaba
May 12, 2021

/etc/nologin is right

sheilawu
May 30, 2023

/etc/nologin is right answer

rmmichael95
Aug 1, 2023

The file that prevents login is /ect/nologin, /sbin/nologin is the command LPI-Learning-Material 102-500 Page 518: To prevent all users except the root user from logging into the system temporarily, the superuser may create the file named /ect/nologin...Note there is allso a nologin commad "sudo usermod -s /sbin/nologin user"

georgerobel
Feb 26, 2021

The right answer is /etc/nologin

w3rr
May 4, 2022

/etc/nologin

Mchoeti
Apr 6, 2023

No sorry, if you want to block ALL temporary you will have to create the /etc/nologin If you want to block specific use /sbin/nologin Not sure. please check in your console which file is present at the moment and you will understand

Mchoeti
Apr 6, 2023

so the answer shoule be /etc/nologin

blk_542
Jun 9, 2023

ChatGTP: "When a user's login shell is set to /sbin/nologin, they are effectively denied interactive access to the system. However, unlike the /etc/nologin file, this restriction is applied on a per-user basis rather than system-wide."