I have a BeagleBone Black wireless with Debian 8.7. I have created a user s
with the command adduser s
and then added the user to the sudoers file with the command usermod -a -G s
.
When I try to shutdown my Pi as user s
with the command shutdown -h now
I receive this error:
Failed to set wall message, ignoring: The name org.freedesktop.PolicyKit1 was not provided by any .service files
Failed to power off system via logind: The name org.freedesktop.PolicyKit1 was not provided by any .service files
Failed to start poweroff.target: The name org.freedesktop.PolicyKit1 was not provided by any .service files See system logs and 'systemctl status poweroff.target' for details.
Failed to open /dev/initctl: Permission denied
Failed to talk to init daemon.
But when I run the same command with sudo sudo shutdown -h now
the command executes properly.
Why is this happening? Is shutdown a root
only Command?