nologin(8) - man - phpman

Look up a command

 

Markdown Format | JSON API | MCP Server Tool


TLDR: nologin (tldr-pages)

Alternative shell that prevents a user from logging in.

  • Set a user's login shell to `nologin` to prevent the user from logging in
    chsh {{-s|--shell}} {{user}} nologin
  • Customize message for users with the login shell of `nologin`
    echo "{{declined_login_message}}" > /etc/nologin.txt
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).

       If SSH_ORIGINAL_COMMAND is populated it will be logged.

SEE ALSO
       login(1), nologin(5).

HISTORY
       The nologin command appeared in BSD 4.4.



shadow-utils 4.8.1                           02/06/2024                                   NOLOGIN(8)

Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 12:38 @216.73.216.151 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!