nologin(8)

nologin8

Politely refuse a login

Usage

nologin

Overview

The nologin is intended as a replacement shell field for accounts that have been disabled.

When executed, nologin first writes about the login attempt to syslog(3) and then displays a message that an account is not available.

To disable all logins, investigate nologin(5).

Exit status

The nologin utility always exits non-zero.

Examples

Here is a demonstration of executing nologin:

$ nologin
This account is currently not available.
$ tail -n 1 /var/log/messages
Mar 30 21:53:07 example.org nologin[65992]: Attempted login by beastie on /dev/pts/18

Releases

87 releases since FreeBSD 2.0.5-RELEASE; the text changed 46 times.

  1. 2.0.5–2.2.6
  2. 2.2.7–2.2.8
  3. 2.2.9
  4. 3.0–3.1
  5. 3.2
  6. 3.3–3.5.1
  7. 4.0–4.2
  8. 4.3
  9. 4.4
  10. 4.5–4.7
  11. 4.8–4.11
  12. 5.0–5.1
  13. 5.2–5.2.1
  14. 5.3–6.3
  15. 6.4
  16. 7.0
  17. 7.1
  18. 7.2
  19. 7.3
  20. 7.4
  21. 8.0
  22. 8.1
  23. 8.2
  24. 8.3
  25. 8.4
  26. 9.0
  27. 9.1
  28. 9.2
  29. 9.3
  30. 10.0
  31. 10.1
  32. 10.2
  33. 10.3
  34. 10.4
  35. 11.0
  36. 11.1
  37. 11.2
  38. 11.3
  39. 11.4
  40. 12.0
  41. 12.1
  42. 12.2
  43. 12.3
  44. 12.4
  45. 13.0–13.2
  46. 13.3–14.5
  47. 15.0–16.0

History

The nologin utility appeared in 4.4BSD.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.