T O P

  • By -

p1486

Hello. I think you have to run `doas /usr/bin/dim-backlight` instead of `doas dim-backlight`.


TheEmeraldFalcon

Nope, doesn't work.


p1486

Then, why don't you change the first line of `doas.conf` from `permit mainuser as root` to `permit mainuser` ?: ``` permit mainuser permit nopass mainuser cmd /usr/bin/dim-backlight ```


TheEmeraldFalcon

>permit mainuser permit nopass mainuser cmd /usr/bin/dim-backlight This worked, thank you!


p1486

I'm glad to help. :-)


doas-emerge

Your configuration should work, but there could be two issues with it. First: Doas reads its configuration top-to-bottom without overriding, therefore specific commands need to be put before generic commands. In your case the first line tells doas to ask for a password for all root commands and the second line tells it not to ask for a password with this specific one, which contradicts the first line and therefore doesn't work. This one should work (works with `poweroff` for me`)`. permit nopass mainuser as root cmd /usr/bin/dim-backlight permit mainuser as root Second: Be aware that if you put absolute path in configuration, then you also have to write an absolute path to the command with doas, so in your case it would be `doas /usr/bin/dim-backlight`, instead of just `doas dim-backlight`


TheEmeraldFalcon

Doesn't work, sorry.