If you look more closely at the /etc/passwd file, you will find the /bin/false command as a login shell for many system accounts. Actually, false is not a shell, but a command that does nothing and then also ends with a status code that signals an error. The result is simple.
What is the difference between a user shell of USR sbin Nologin and bin false explain the difference?
Originally, /bin/false has been created for a general command as it always returns non-zero. Then, seems it is used as nologin user’s shell before creating /sbin/nologin. On the other hand, /sbin/nologin has been created for nologin user’s shell, it has a feature to give a message in /etc/nologin.
What does bin Nologin mean?
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.