On Mon, 13 Aug 2018 20:39:33 +0200, Cecil Westerhof wrote:
>
Ok, I have something to try. It is untested so UMMV.
I assume you want the password bypassed since you made
the entry in sudoers for sudo. This should do it...
Create a text file called - com.ubuntu.pkexec.systemctl.policy
Place it in - /usr/share/polkit-1/actions/
Use this command - pkexec systemctl user
Place this in the text file -
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"
http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<action id="org.freedesktop.policykit.pkexec.systemctl">
<defaults>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/bin/systemctl restart vmstatLog</annotate>
</action>
</policyconfig>
If it don't work, try putting quotes around the entry for
policykit.exec.path, "/bin/systemctl restart vmstatLog".
If it still won't work, someone smarter than me will need
to chime in.
--
<Wildman> GNU/Linux user #557453