chsh -s /sbin/nologin USERNAMESee "man nologin" for more info.
Computer Tips - Linux: How can I deny login to a user?
Date: 2013oct27
OS: Linux
Q. Linux: How can I deny login to a user?
A. Set their shell to /sbin/nologin