How to disable hibernating?
Solution 1:
Run this:
sudoedit /usr/share/polkit-1/actions/org.freedesktop.upower.policy
Change action id="org.freedesktop.upower.hibernate">defaults>allow_active
to no
. Save and exit. That will stop users being able to do that from the desktop.
If you have a sleep or hibernate button on your keyboard or case, these will still work IIRC so you need to "break" their default behaviour. Run:
gconftool -s /apps/gnome-power-manager/buttons/hibernate -t string interactive
Source.