Skip to main content
IBM  
Shop Support Downloads
IBM Home Products Consulting Industries News About IBM
IBM developerWorks : Linux : Education - Tutorials
LPI certification 102 exam prep, Part 3
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
4. Security overview
  


Refusing logins for maintenance page 13 of 21


In addition to the above methods, there is a generic way to refuse logins by creating the file /etc/nologin. Usually this method is used for short-term maintenance operations. Logins by root will still be allowed, but logins by other users will be denied. For example:


# cat > /etc/nologin
==============================================

  System is currently undergoing maintenance 
  until 2:00.  Please come back later.
  
==============================================
# telnet localhost
login: agriffis
Password: 
==============================================

  System is currently undergoing maintenance
  until 2:00.  Please come back later.

==============================================

Login incorrect

Be sure to delete the file when you're done with maintenance, otherwise nobody will be able to login until you remember! Not that I've ever done this, no, not me... ;-)


Main menuSection menuFeedbackPreviousNext
Privacy Legal Contact