Where Are Valid Login Shells Listed on Linux?
Linux lists valid login shells in /etc/shells, the gatekeeper file behind chsh and FTP access.
Last updated
One small file decides which programs count as shells system wide. Login tools, file transfer daemons, and account utilities all consult /etc/shells before trusting a user's configured shell.
Custom shells must register here to work fully: interactive use succeeds regardless, but chsh and friends refuse unlisted paths. Auditing the file takes seconds and explains mysterious login rejections.
Where Linux stores this, by platform
/etc/shells
One full binary path per line. Custom shells need listing here before chsh and login services accept them.
Frequently asked questions
How do I register a new shell?
Append the full binary path to the file as root. Until listed, the shell works interactively but chsh rejects it and some services refuse logins. One line per shell, full paths only.
Why does FTP reject valid logins?
Services like FTP and cron check this list before granting access. Unlisted shells mean denied logins even with correct passwords. The file is small enough to audit in seconds.
Notice an outdated path? Let us know.