Celty
August 24, 2022, 11:41am
1
Hi friends,
I seem to have lost permission to run something as root and I am kind of baffled how this could have happened. I use doas and have it configured as per the Archwiki setup including the opendoas-sudo aur package to manage the symlink. It has been working fine up until this morning and I have not updated my system or done any other modifications which could explain it.
[root@main alex]# cat /etc/doas.conf
permit :wheel
permit nopass :wheel as root cmd /usr/bin/smartctl
permit persist :wheel
[root@main alex]# ls -l /etc/doas.conf
-r-------- 1 root root 89 Aug 24 13:26 /etc/doas.conf
[root@main alex]# groups alex
wheel alex
I’m not sure what else I could check?
I0F
August 24, 2022, 12:30pm
2
Did you check if the config file is okay?
dalto
August 24, 2022, 12:31pm
3
Isn’t that information all in the first post above?
Is there anything in the logs showing authentication failures?
Celty
August 24, 2022, 12:38pm
4
Could you be a bit more specific. Where do I look for logs?
dalto
August 24, 2022, 12:42pm
5
Start with journalctl
. One easy way is to use journalctl -f
and then try to run doas
in a different terminal.
If that doesn’t show anything, see if doas itself does any logging.
Celty
August 24, 2022, 12:43pm
6
dalto:
journalctl -f
Nothing new. Shows: Aug 24 14:43:09 main doas[21502]: command not permitted for alex: paru -Syu
Can you run this?
doas -C /etc/doas.conf && echo "config ok" || echo "config error"
Also check this note:
Note: The configuration file must end with a newline.