If you take a look at the /etc/passwd file (as root), you'll see lines something like this for each user:
username:x:501:501:username:/home/username:/bin/bash

Just change the shell from /bin/bash to something non-existent (like /bin/nologin) for users that you wish to prevent logging in like so:
username:x:501:501:username:/home/username:/bin/nologin

Obviously /bin/login doesn't exist, so they can't log in as they have no valid shell.
http://blog.nice2seeyou.com/mike/trackback/2
YOUR COMMENT IS THE CRITICAL SUCCESS FACTOR FOR THE QUALITY OF BLOG POST