Monday, July 2, 2007

/etc/nologin

This command politely refuses any login or authentication attempt. Could be helpful when you are trying to accomplish something or do stuff from the server while restricting login attempts. And doing this, any message inside this file could be possibly shown to any user with current connection attempts.

If /etc/nologin does exists, any attempts even popping out your emails, ssh connections, or webmail logins are completely denied. Just make sure you don't logout from that server after issuing this command remotely or you have an active multiple ssh connections remotely to your server when you issue this command! If all fails, it would require direct physical access with your next ssh logins or tell someone to reboot the production server for you, which is bad.

Upon reboot, linux deletes this file automatically.

Sample:

#cat /etc/nologin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Any connection and authentication attempts are being
denied for now due to module authentication upgrade.
Please try back later after a few minutes. Thank you
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy