In Linux, you can prevent a user from login by locking it.

Lock

$ sudo passwd -l [user]

Unlock

$ sudo passwd -u [user]