modify the power button options to shutdown the system as soo as the power button is pressed.
solution:you can use dconf-tools(also known as dconf editor):
install dconf-tools and then run dconf-editor
sudo apt-get install dconf-tools (in terminal) or get it from ubuntu softwARE center .
Press alt+f2 and open dconf-editor (or in a terminal type dconf-editor)
Navigate to Navigate to org>>gnome>>settings-daemon>>plugins>>power and set your default button-power action there.
I hope this will help you.
http://www.linuxquestions.org/questions/ubuntu-63/ubuntu-12-04-a-4175436415/