If you are looking to ban users that you allow to log in from using a terminal for security reasons, it does not make much sense. "The Terminal" is a tool that will allow you to perform certain actions that you have rights to do. If you take away the right to run "the terminal" (which is actually just another program), the right to perform these actions is not taken away. A user could simply run another program (downloaded?) to perform these actions.
Now if you want to block other users (non-standard I would call them) from loging in at all (be it via the normal method, or via 'the terminal'), you could change the shell line in
/etc/passwd to something like
/sbin/nologin: this user will not be able to log in.
Example (I can't stress enough that this is probably not what you want for
normal users, but it is the only way I can see use for the question. proceed with care)
I'm currently using
/bin/false instead of
nologin it seems, but that's how it looks
As @gertvdijk mentions in the comments, you could (should?) do this with the
chsh (CHange SHell) command like so:
$ sudo chsh -s /usr/sbin/nologin username