NOLOGIN(8)
๐ NOLOGIN(8) โ the "no bestie, not today" page
ok so this is the manual page for nologin, section 8 of the system administration manuals, and honestly? she's a whole mood. ๐
โจ NAME โจ
nologin โ politely refuse a login ๐ซถ
like, she's not mean about it. she just says no.
๐ธ SYNOPSIS ๐ธ
nologin [-V] [-h]
๐ฆ DESCRIPTION ๐ฆ
okay so picture this: nologin displays a message saying an account is not available, and then exits non-zero. that's her whole job. that's the gig. ๐
she's literally intended to be used as a replacement shell field โ you drop her in where a shell would go, and boom, that account can't log in anymore. it's giving bouncer at the club. ๐
if the file /etc/nologin.txt exists, nologin displays its contents to the user instead of the default message. so you can write your own little "sorry babe" note. ๐
the exit status returned by nologin is always 1. no cap. always.
๐ OPTIONS ๐
okay so this next part is a little unhinged but stay with me โ there's a whole pile of shell command-line options that nologin just... ignores, so that you don't get a nologin error. they're listed exactly like this:
-c,--commandcommand--init-file-i--interactive--init-filefile-i,--interactive-l,--login--noprofile--norc--posix--rcfilefile-r,--restricted
these shell command-line options are ignored to avoid nologin error. she's just being chill about it. ๐
and then the two options that actually do stuff:
-h,--helpโ display help text and exit. the classic. ๐ซถ-V,--versionโ display version and exit. also the classic. โญ
๐ง NOTES ๐ง
nologin is a per-account way to disable login โ usually used for system accounts like http or ftp. so like, one account at a time, very targeted, very intentional. ๐ฏ
nologin uses /etc/nologin.txt as an optional source for a non-default message, but the login access is always refused independently of that file. so even if the file's missing, or weird, or you wrote something cute in it โ doesn't matter, still no entry. ๐ซ
pam_nologin(8) PAM module usually prevents all non-root users from logging into the system. and pam_nologin(8)'s functionality is controlled by /var/run/nologin or the /etc/nologin file. so that one's the "everyone out" vibe, and nologin is the "just you, specifically" vibe. iykyk. ๐
๐ HISTORY ๐
the nologin command appeared in 4.4BSD. she's been serving no since before most of us were born. icon behavior, fr fr. ๐
๐บ AUTHORS ๐บ
Karel Zak <kzak@redhat.com> ๐ซถ
๐ SEE ALSO ๐
๐ REPORTING BUGS ๐
for bug reports, use the issue tracker <https://github.com/util-linux/util-linux/issues>. they're lovely, they'll listen. ๐
โญ AVAILABILITY โญ
the nologin command is part of the util-linux package, which can be downloaded from the Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>. go get her. ๐
okay that's the whole page, mwah ๐ โ this was util-linux 2.42.4, dated 2026-09-21, and yes she's still refusing logins in style. periodt. ๐ โจ
๐ฆ where this page comes from
- arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms