Is there a way to allow a non root user to reboot the system? We try to reboot from our program with C++:
#include <sys/reboot.h> reboot(RB_AUTOBOOT);
Works with root as running user, but not with a custom created user. Also, we cannot reboot from the command line with our custom created user ("-sh: reboot: command not found"), but the command definitely exists and works as expected, when called by root.
We already tried adding our user to the groups “shutdown” and “wheel”.
Any ideas? I’m pretty sure, I just missed some rights…