Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

nologin(8) [v7 man page]

NOLOGIN(8)						    System Management Commands							NOLOGIN(8)

NAME
nologin - politely refuse a login SYNOPSIS
nologin DESCRIPTION
The nologin command displays a message that an account is not available and exits non-zero. It is intended as a replacement shell field for accounts that have been disabled. To disable all logins, investigate nologin(5). SEE ALSO
login(1), nologin(5). HISTORY
The nologin command appeared in BSD 4.4. shadow-utils 4.5 01/25/2018 NOLOGIN(8)

Check Out this Related Man Page

NOLOGIN(5)						      BSD File Formats Manual							NOLOGIN(5)

NAME
nologin -- disallow logins DESCRIPTION
Programs such as login(1) disallow logins if the nologin file exists. The programs display the contents of nologin to the user if possible and interrupt the login sequence. This makes it simple to temporarily prevent incoming logins systemwide. To disable logins on a per-account basis, investigate nologin(8). SECURITY
The nologin file is ignored for user root by default. IMPLEMENTATION NOTES
The nologin feature is implemented through login.conf(5), which allows to change the pathname of the file and to extend the list of users exempt from temporary login restriction. PAM-aware programs can be selectively configured to respect nologin using the pam_nologin(8) module via pam.conf(5). The nologin file will be removed at system boot if it resides in /var/run and cleanvar_enable is set to ``YES'' in rc.conf(5), which is default. Therefore system reboot can effectively re-enable logins. FILES
/var/run/nologin default location of nologin SEE ALSO
login(1), login.conf(5), pam.conf(5), rc.conf(5), nologin(8), pam_nologin(8), shutdown(8) BSD
May 10, 2007 BSD
Man Page

6 More Discussions You Might Find Interesting

1. Solaris

nologin shell on Solaris?

I'm setting up a Solaris 10 box to run Lawson application, which needs users to have Unix acounts, but the users will not be using interactive shell. To make it more secure, I'd rather not give them a valid shell. I know there's a trick by putting /noshell in the /etc/passwd file, but the problem... (2 Replies)
Discussion started by: GKnight
2 Replies

2. AIX

aix nologin shell

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)
Discussion started by: zuessh
5 Replies

3. Shell Programming and Scripting

Need help regarding user with nologin

Hi, Need one clarification.. If suppose, I have disabled the login to a particular user XXX, but not deleted the user. So the scripts which must be executed using the user XXX can still be executed using that user or is it not possible..? In our tasks, we are disabling the user XXX, and after... (1 Reply)
Discussion started by: Dpu
1 Replies

4. UNIX for Dummies Questions & Answers

SSH with a nologin account

Is it possible to SSH with an account that has its shell set to /sbin/nologin? The reason I ask is because I am running an instance of nagios where I need to use SSH keys to run a check, but I am getting connect errors in Nagios. Also, what is the risk I run into if I just simply change my... (2 Replies)
Discussion started by: streetfighter2
2 Replies

5. Solaris

Is there a difference between setting a user as nologin and setting it as a role?

Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users. In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies

6. Shell Programming and Scripting

System shell nologin script required

Hi Part of our security audit we found that following system account's had shells configured; sync halt shutdown 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)
Discussion started by: Gamma
5 Replies