Once you start digging into a Linux system, you may find some confusing or unexpected things, like /usr/bin/false, for example. Why is it there and what is its purpose? Today’s SuperUser Q&A post has the answer to a curious reader’s questions.
Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.
The Question
SuperUser reader user7326333 wants to know why some system users have /usr/bin/false as their shell:
Why do some system users have /usr/bin/false as their shell?
The Answer
SuperUser contributors duDE, Toby Speight, and bbaassssiiee have the answer for us. First up, duDE:
Followed by the answer from Toby Speight:
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. The user logs in and immediately sees the login prompt again.
And our final answer from bbaassssiiee:
Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.
Image Credit: OpenStack Docs (OpenStack Project)