[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

polickit rules - what wrong



I try to allow ordinary user to start/stop system service.

I try to make
/etc/polkit-1/localauthority/50-local.d/49-nopasswd_limited.conf
which contains:
--8<---------------cut here---------------start------------->8---
polkit.addRule(function(action, subject) {
   if (action.id == "org.freedesktop.systemd1.manage-units") {
        if (action.lookup("unit") == "openvpn.service") {
                     var verb = action.lookup("verb");
                     if (verb == "start" || verb == "stop" || verb == "restart") {
                                                                    return polkit.Result.YES;
                                                                                }
                                                                                        }
                                                                                            }
});
--8<---------------cut here---------------end--------------->8---
but no effect.
What do I wrong?
KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/
"Sęk w tym, że człowiek rozumny jest statystycznie głupi" - Stanisław Lem.


Reply to: