Comment 11 for bug 681708

Revision history for this message
Arend van Spriel (aspriel) wrote :

You could try adding sudo in your cron script, but then you have to configure nmcli to be sudoed without password. You will probably want to have a look at /etc/dbus-1/system.d/NetworkManager.conf. This specifies what is allowed and there is a special policy configuration with attribute 'at_console' which make your command line action work, but below that is policy for default context which denies most actions. This one applies to your cron job.

You could allow same for default as for at_console, but that may depend what you consider safe on your machine.