NOLOGIN(5) BSD File Formats Manual NOLOGIN(5)NAME
nologin -- file disallowing and containing reason for disallowing logins
The file /etc/nologin, if it exists, causes the login procedure, used by programs such as login(1), to terminate. The program may display
the contents of /etc/nologin to the user before exiting.
This file is a simple mechanism to temporarily prevent incoming logins. As such, the file /etc/nologin is created by shutdown(8) five min-
utes before system shutdown, or immediately if shutdown is in less than five minutes. The file /etc/nologin is removed just before
To disable logins on a per-account basis, see nologin(8).
The file /etc/nologin has no affect on the login procedure for the root user.
/etc/nologin The nologin file resides in /etc.
NO LOGINS: System going down at 18:22
SEE ALSO login(1), ftpd(8), nologin(8), rshd(8), shutdown(8), sshd(8)BSD December 9, 2005 BSD
Check Out this Related Man Page
SHUTDOWN(8) System Manager's Manual SHUTDOWN(8)NAME
shutdown - close down the system at a given time
shutdown [ -k ] [ -r ] [ -h ] [ -f ] [ -n ] time [ warning-message ... ]
Shutdown provides an automated shutdown procedure which a super-user can use to notify users nicely when the system is shutting down, sav-
ing them from system administrators, hackers, and gurus, who would otherwise not bother with niceties.
Time is the time at which shutdown will bring the system down and may be the word now (indicating an immediate shutdown) or specify a
future time in one of two formats: +number and hour:min. The first form brings the system down in number minutes and the second brings the
system down at the time of day indicated (as a 24-hour clock).
At intervals which get closer together as apocalypse approaches, warning messages are displayed at the terminals of all users on the sys-
tem. Five minutes before shutdown, or immediately if shutdown is in less than 5 minutes, logins are disabled by creating /etc/nologin and
writing a message there. If this file exists when a user attempts to log in, login(1) prints its contents and exits. The file is removed
just before shutdown exits.
At shutdown time a message is written in the system log, containing the time of shutdown, who ran shutdown and the reason. Then a termi-
nate signal is sent to init to bring the system down to single-user state. Alternatively, if -r, -h, or -k was used, then shutdown will
exec reboot(8), halt(8), or avoid shutting the system down (respectively). (If it isn't obvious, -k is to make people think the system is
With the -f option, shutdown arranges, in the manner of fastboot(8), that when the system is rebooted the file systems will not be checked.
The -n option prevents the normal sync(2) before stopping.
The time of the shutdown and the warning message are placed in /etc/nologin and should be used to inform the users about when the system
will be back up and why it is going down (or anything else).
/etc/nologin tells login not to let anyone log in
SEE ALSO login(1), reboot(8), fastboot(8)BUGS
Only allows you to kill the system between now and 23:59 if you use the absolute time for shutdown.
4th Berkeley Distribution November 16, 1996 SHUTDOWN(8)
I was wondering if there was an easy way to give a nonroot user shutdown privileges? I've been reading lots about it but it's all long and complicated for what i need to do. Really i just need this user to beable to run one command shutdown -h now and thats it. Oh yeah and i'm running... (4 Replies)
is the nologin shell available in AIX 5.2? I am familiar with the nologin shell in linux and restricting shell access but still allowing ftp etc. Can this be done in AIX? I have not been able to locate any documentation. Thanks in advance (5 Replies)
I want to temporarily disable a user account on HP-UX at the start of a script and renable the account at the end of the script. What would be the best method on HP-UX to temporarily disable a user account? I know of the passwd -l option that will lock the account, but I do not see a flag for... (4 Replies)
I have to limit the root logins on my aix box (aix 5.3)
I change the value on the /etc/security/user
default (login and rlogin) change to false
and add to root (rlogin and login = false)
I tried in different ways but I got the same.
Root still can login
I try algo... (6 Replies)
This is actually a good interview question.
On linux, the permissions and group for 'shutdown' and 'cat' is the same.
-rwxr-xr-x 1 root root 18K 2008-05-21 10:43 shutdown
-rwxr-xr-x 1 root root 17K 2007-01-30 19:51 cat
Then why is it that a... (5 Replies)
Has anyone ever been burned by editing /etc/default/security with vi? or should this only be edited inside of SAM or some such tool?
I want to turn on /etc/nologin as a tool to lock out all users but keep my system in multi mode for DB maintenance. TIA -KJ
PS I have been... (3 Replies)
I am using Red Hat Enterprise Linux ES release 4 (Nahant Update 5). Here I have created one user with /sbin/nologin shll such that login is not possible only ftp is possible. But I want to do another thing that the user can not roam around after ftp.
I had tried one way.
in... (4 Replies)
from last few days my laptop is not whutting down properly.. when ever i ty to shutdown it restarts again.. what may be problem?? antivirus is updated till date.. and i use windows xp sp2....
deepak. (5 Replies)
cannot login to a HP unix server using root as well as other logins.
Even root also cannot enter. It seems that they have changed some permissions in /
Any way of recovering the system or getting logged in .
Thanks in advance
Rj (8 Replies)
Ok got a strange one here. None of my user accounts are able to login into the system. When trying to ssh to the server i get the following.
Could not chdir to home directory /home/<homedir>: Permission denied
/bin/sh: Permission denied
I checked the permissions on the home directory and even... (7 Replies)
Yes, it's that minefield again. I'm building an AJAX database interface which uses maria/mysql logins instead of keeping a bunch of its own private logins, to try and keep it simple.
The thorny bit is, of course, the passwords. Doing this requires it to remember passwords between sessions, not... (4 Replies)
Part of our security audit we found that following system account's had shells configured;
I believe this can be achieved by following commands:
chsh -s /sbin/nologin (user)
usermod -s /sbin/nologin (user)
However, I would like simple script to... (5 Replies)