permission to execute poweroff with user other than root

Status
Not open for further replies.

Kei

Dabbler
Joined
May 26, 2016
Messages
45
Hello guys, with FN 9.x I was able to execute a ssh command (passwordless ssh) from another machine which would login to FN and execute a poweroff.
To obtain this, I needed to make this script run at every boot on FN side:
echo "userxxx ALL=(ALL) NOPASSWD: /sbin/shutdown" >> /usr/local/etc/sudoers

However now, this does not seem to work anymore (after updating to FN11, as I am prompted with an error saying that this user doesnt have permission to execute /sbin/shutdown
I've also tried to grant sudo option from the GUI at this user and its group, but to no avail. What should I do?
 

Kei

Dabbler
Joined
May 26, 2016
Messages
45
Unfortunately no. The only thing I thought it's editing a file with an user via ssh, for example echo 1 > path/to/file
And a cron job with root permissions that checks the file every minute or so, so when the value of the file is at 1, the script with root permissions executes the shutdown. This is a very clumsy solution, I know, but it feels very retarded not being able to accomplish this with Visudo like in the old FN 9.x version.
 
Status
Not open for further replies.
Top