Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #173646

polickit rules - what wrong

From kjonca@poczta.onet.pl (Kamil Jońca)
Newsgroups linux.debian.user
Subject polickit rules - what wrong
Date 2016-10-20 19:30 +0200
Message-ID <supkd-28v-19@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

polickit rules - what wrong  kjonca@poczta.onet.pl (Kamil Jońca) - 2016-10-20 19:30 +0200
  Re: polickit rules - what wrong Brian <ad44@cityscape.co.uk> - 2016-10-20 20:40 +0200
  Re: polickit rules - what wrong Ansgar Burchardt <"Ansgar Burchardt"@43-1.org> - 2016-10-20 20:40 +0200
    Re: polickit rules - what wrong Brian <ad44@cityscape.co.uk> - 2016-10-20 21:20 +0200
      Re: polickit rules - what wrong Ansgar Burchardt <"Ansgar Burchardt"@43-1.org> - 2016-10-20 22:30 +0200

csiph-web