I found the following command line to shut down a Debian/GNU Linux system
dbus-send \ --system \ --dest=org.freedesktop.ConsoleKit \ --type=method_call \ --print-reply \ --reply-timeout=2000 \ /org/freedesktop/ConsoleKit/Manager \ org.freedesktop.ConsoleKit.Manager.Stop
It works if I execute the command as superuser, but as a non-privileged user it says:
Error org.freedesktop.ConsoleKit.Manager.NotPrivileged: Not Authorized
I would like to know if it is possible to modify such a command in such a way that, interacting with PolicyKit, it can grant the privilege to shut down the system to a normal user.