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, --command command
  • --init-file
  • -i --interactive
  • --init-file file
  • -i, --interactive
  • -l, --login
  • --noprofile
  • --norc
  • --posix
  • --rcfile file
  • -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