/sbin/nologin or /usr/sbin/nologin used as a shell in Linux to politely refuse a login attempt. It is a per-account way to disable login on Linux. If I set shell to /usr/sbin/nologin user can not ssh into my server. It is typically used by many system services that need an account but do not want to create security issues by granting them login access. From the man page:

nologin displays a message that an account is not available and exits non-zero. It is intended as a replacement shell field to deny login access to an account.
If the file /etc/nologin.txt exists, nologin displays its contents to the user instead of the default message.
The exit code returned by nologin is always 1.