For Linux
Shutdown linux from the command terminal by adding this function to roots' .bashrc file:
quit ()
{
poweroff -d
}
you have to do is be root, and type quit.
Edit:
In linux /etc/passwd is file where users r listed.We can aslo block a particular user there