0

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?

ob1
  • 201

2 Answers2

3

Yes, shutdown is a root only command.

1

Is shutdown a root only Command?

No, it is not; but you do not have installed and enabled the part of the system, PolicyKit as named in those error messages, that extends it to other users apart from the superuser via an administrator-supplied policy.

Further reading

JdeBP
  • 68,745