Sample Header Ad - 728x90

Why does the at command not control my wifi via nmcli?

0 votes
0 answers
85 views
I have at installed on Manjaro. This works fine:
echo "echo 'hi' > /tmp/greetings" | at now + 1 minutes -M
But if I try to switch off my wifi after one minute it doesn't do anything:
echo "nmcli d disconnect wlp123s4" | at now + 1 minutes -M
Running nmcli in the terminal works, even from sh. journalctl shows me reason="org.freedesktop.NetworkManager.network-control request failed: not authorized". After seeing https://unix.stackexchange.com/questions/580555/ I checked my /etc/polkit-1/rules.d/99-manjaro.rules and see no rules related to NetworkManager. Should I add such a rule? This is for a desktop computer, not a remote server.
Asked by aBe (183 rep)
Jan 2, 2023, 10:49 AM