How to Disable Shell Access for a Specific User
If you would like to disable shell access for a specific user you can do the following.
In this example we will disable shell access for username johnsmith:
chsh -s /bin/false johnsmith
Please note that this disables shell access for the user when they are logging in using the normal means. If the user is able to execute commands through a PHP/CGI script they can spawn their own shell.