i'll just butt in with this:
dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
might work for you ..
i've just been using `sudo poweroff` (obviously with sudo nopassword rights) .. but now thinking about it, i should probly be using the `/usr/bin/shutdown -p now` to shutdown correctly :p
and hence that dbus/consolekit approach above might not be the correct way even it does work..