Remove and block a user from Linux server

Hi,

Can anyone please guide me how can I remove/block a user from a server access.

/usr/sbin/adduser -d /home/john john
echo ****** | passwd --stdin john

I used the above command to add a user "john". How do I delete and block john.

Appreciate your responses.

On many systems:

userdel john

If you want to remove the homedir also, use the -r flag.
Alternativly, to just block access without removing the account, edit /etc/shadow and change the password to *LK* to lock the account.
If userdel isn't available, you can manually remove the entires from /etc/passwd and /etc/shadow. Then just check /etc/group and remove their name, and delete their home directory.