File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,15 @@ ACTIVATE="$1"
13
13
# Note to future dev: Method attempted which proved unsuccessful:
14
14
# 1. Add user to netdev, systemd-network or network groups
15
15
FILE=/etc/NetworkManager/NetworkManager.conf
16
+ FILE2=/var/lib/polkit-1/localauthority/50-local.d/networkmanager.pkla
16
17
17
18
# Cleanup after previous runs of this script - or disable access if previously given (idempotency)
18
19
sed --in-place ' /auth-polkit=false/d' $FILE
20
+ # Only make this replacement for user-related entries
21
+ sed --in-place ' /unix-group:user/{ n; n; n; n; s/ResultActive=yes/ResultActive=no/ }' $FILE2
19
22
20
23
if [ " $ACTIVATE " = ' True' ]; then
21
24
sed --in-place ' /\[main\]/a\auth-polkit=false' $FILE
25
+ # Only make this replacement for user-related entries
26
+ sed --in-place ' /unix-group:user/{ n; n; n; n; s/ResultActive=no/ResultActive=yes/ }' $FILE2
22
27
fi
You can’t perform that action at this time.
0 commit comments