#Issue with system permissions

1 messages · Page 1 of 1 (latest)

iron trout
#

After a recent system update I have been having some problems with user permissions. When I try signing commits using YubiKey I get an error from PS/SC daemon Rejected unauthorized PC/SC client and when I try using nmtui to deactivate a network connection I get an errorNot authorized to deactivate connections. Does anyone know how to solve it?

ashen void
iron trout
ashen void
ashen void
iron trout
#

How can I fix it?

ashen void
#
pacman -Qkk networkmanager polkit
#
sha256sum /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy
iron trout
#
networkmanager: 514 total files, 0 altered files
polkit: 217 total files, 0 altered files
iron trout
iron trout
#
backup file: pambase: /etc/pam.d/system-login (Modification time mismatch)
backup file: pambase: /etc/pam.d/system-login (Size mismatch)
backup file: pambase: /etc/pam.d/system-login (MD5 checksum mismatch)
backup file: pambase: /etc/pam.d/system-login (SHA256 checksum mismatch)
pambase: 8 total files, 0 altered files
#
realtime libvirt plugdev docker video lp kvm input audio wheel kamack38
ashen void
iron trout
#

A quick question. Why should I upload files to ix.io instead of sending them by Discord?

ashen void
iron trout
#

ok

ashen void
# iron trout ok

Let's check the Polkit logs

First remove the --no-debug flag

systemctl edit polkit.service

Read the first 2 lines carefully and add the following content

[Service]
ExecStart=
ExecStart=/usr/lib/polkit-1/polkitd

Then restart polkit

iron trout
ashen void
iron trout
#

It should look like this?

ashen void
iron trout
#

done

ashen void
# iron trout done

In the meantime, please upload the polkit rules

sudo tar --zstd -cv /etc/polkit-1/rules.d | curl -F 'f:1=<-' ix.io
  • Please ensure that these rules do not contain sensitive information.
iron trout
#

There are no files there

ashen void
#

Then there will be no need for an upload

ashen void
iron trout
#

There is an Error loading script /etc/polkit-1/rules.d/00-log.rules

ashen void
iron trout
#
Error loading script /etc/polkit-1/rules.d/00-log.rules
ashen void
iron trout
#
89d6ec9c2606d7a922c9c47c4cc3403014bb10328763102c0da0f3ab6c025b07  /etc/polkit-1/rules.d/00-log.rules
#

I just copied the command

ashen void
iron trout
#

sudo touch /etc/polkit-1/rules.d/00-log.rules
journalctl -S -5m | curl -F 'f:1=<-' ix.io

ashen void
iron trout
ashen void
# iron trout http://ix.io/4Dqg

Well, it seems that touch alone does not trigger recompilation.

sudo tee /etc/polkit-1/rules.d/00-log.rules << 'EOF'
polkit.addRule(function (action, subject) {
        polkit.log("==> action=" + action);
        polkit.log("==> subject=" + subject);
});
EOF
sleep 4
journalctl -S -5m | curl -F 'f:1=<-' ix.io
iron trout
ashen void
ashen void
#

AFK

iron trout
#
/etc/polkit-1:
rules.d

/etc/polkit-1/rules.d:
00-log.rules
iron trout
#

Ping me when you'll be back

iron trout
#

There was an issue with the file permissions

#

Its permissions was 600, but I changed it to 644 and the rule now loads properly

#

I tired deactivating the network connection and here's my journalctl log

polkitd[155784]: ==> action=[Action id='org.freedesktop.login1.inhibit-delay-sleep']
polkitd[155784]: ==> subject=[Subject pid=156707 user='kamack38' groups=kamack38,wheel,audio,input,kvm,lp,video,docker,plugdev,libvirt,realtime seat=null session=null local=false active=false]
polkitd[155784]: ==> action=[Action id='org.freedesktop.NetworkManager.network-control']
polkitd[155784]: ==> subject=[Subject pid=157445 user='kamack38' groups=kamack38,wheel,audio,input,kvm,lp,video,docker,plugdev,libvirt,realtime seat=null session=null local=false active=false]
NetworkManager[3858]: <info>  [1692047645.7408] audit: op="connection-deactivate" uuid="62179bb0-5381-4628-a8e3-72bdf2fbc766" name="NETIASPOT-B1FCD0" pid=157445 uid=1000 result="fail" reason="Not authorized to deactivate connections"
iron trout
#

The same thing happens when trying to get gpg smart card (gpg --card-status)

systemd[1]: Started PC/SC Smart Card Daemon.
polkitd[8026]: ==> action=[Action id='org.debian.pcsc-lite.access_pcsc']
polkitd[8026]: ==> subject=[Subject pid=41106 user='kamack38' groups=kamack38,wheel,audio,input,kvm,lp,video,docker,plugdev,libvirt,realtime seat=null session=null local=false active=false]
pcscd[46797]: 00000000 auth.c:143:IsClientAuthorized() Process 41106 (user: 1000) is NOT authorized for action: access_pcsc
pcscd[46797]: 00000074 winscard_svc.c:336:ContextThread() Rejected unauthorized PC/SC client
iron trout
#

@ashen void Have you had a chance to look at this yet?

ashen void
iron trout
#

Ok

ashen void
# iron trout Ok

Can you do a package check?

# use paccheck from pacutils since it is faster than pacman -Qkk
sudo pacman -S --noconfirm --needed pacutils
sudo paccheck --file-properties --sha256sum --quiet 2>&1 | tee paccheck.log
ashen void
# iron trout

Do you use Arch repo?

grep -E '^ *Server' /etc/pacman.d/mirrorlist
iron trout
#
Server = https://london.mirror.pkgbuild.com/$repo/os/$arch
Server = https://mirror.f4st.host/archlinux/$repo/os/$arch
Server = https://arch.phinau.de/$repo/os/$arch
Server = https://america.mirror.pkgbuild.com/$repo/os/$arch
Server = https://seoul.mirror.pkgbuild.com/$repo/os/$arch
ashen void
iron trout
#
  File: /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy
  Size: 168594        Blocks: 336        IO Block: 4096   regular file
Device: 0,27    Inode: 18797466    Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2023-04-23 13:57:02.000000000 +0200
Modify: 2023-04-20 18:20:28.000000000 +0200
Change: 2023-04-23 13:57:02.076882859 +0200
 Birth: 2023-04-23 13:57:02.076882859 +0200
ashen void
iron trout
ashen void
iron trout
ashen void
iron trout
#
Error: failed to set networking: Not authorized to enable/disable networking
ashen void
iron trout
iron trout
#

This seems to be a wayland issue. (I use Hyprland)