[SOLVED] Permissions / privileges messed up after SW update

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Permissions / privileges messed up after SW update

Postby TheoSchmidt » Feb 4th, '26, 09:34

Hi All,

Could someone give me a hand, please.
Let me give context:

I stopped updating my system last November as Kernel 6.6.116 broke Grub2 (for some reason after kernel update 116 its initrd image had not been created nor added to grub2, although the system still booted albeit rather slowly).

Yesterday (2 months after I stopped updating my box) Drakconf prevented me from installing new SW unless I updated glibc, which reluctantly I did. I also installed docker (plus several other dependencies) during the update process, but did not reboot as I was also working with Gemini+Antigravity to try out AI-based development (I mention this because Gemini run some scripts as well at the same time, which I suspect may have contributed to the disaster below).

After I rebooted, the system was totally messed up:

1) sound device does not exist anymore (the sound icon on the tray bar says "no output or input devices found").
2) Mageia Control Center does not launch
3) cpupower-gui now complains I don't have permissions to update cpu settings.

After some troubleshooting I found the following:

There seems to be a problem with permissions or polkit as MCC complains I don't have the correct user or permissions (very similar as to what cpupower-gui complains about).
On the same matter, there also seems to be a problem with pulseaudio related to permissions/privileges (when running it manually as root the icon shows a sound device).

All the above makes me suspect that "something" (I don't know what) messed up my system's permission/privileges/policies/etc.

Could someone give a me hand on this? (I really don't want to reinstall my laptop....but I'm completely lost on this)

Here are some details and outputs:
1) I'm currently running Mageia 9, with KDE as my main desktop environment.
2) Kernel 6.6.120
Code: Select all
$ uname -a
Linux localhost 6.6.120-desktop-1.mga9 #1 SMP PREEMPT_DYNAMIC Wed Jan 14 01:59:53 UTC 2026 x86_64 GNU/Linux

3) This is Drakconf's error when running it as my regular user (which BTW worked just fine before the update trashed out my system):
Code: Select all
$ drakconf
Too late to run INIT block at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 257.
Error executing command as another user: Not authorized

This incident has been reported.


4) This is Draksound's error when running it as my regular user (which worked just fine before the update trashed out my system):
Code: Select all
The "draksound" program has crashed with the following error:

  you must be root to run this program at /usr/lib/libDrakX/common.pm line 596.
  Perl's trace:
  drakbug::bug_handler() called from /usr/lib/libDrakX/common.pm:596
  common::require_root_capability() called from /usr/lib/libDrakX/interactive.pm:103
  interactive::vnew() called from /usr/sbin/draksound:30


5) if I run draksound or drakconf using sudo they both launch (but still cannot fix the problems)

6) I tried removing the 9 packages installed yesterday but didn't solve the problem

7) I run a full urpmi --auto-update, including a kernel update to 6.6.120, but that did not solve the problem

8) I re-added my user to my group (just in case)

9) I run msecperms to reset permissions but that did not solve the problem (although it complained about several permissions)
Here's the output:
Code: Select all
$ sudo msecperms
[sudo] password for theo:
INFO: Modified system files: / /etc/ssh/sshd_config /home/theo /root /var/spool/mail
WARNING: Wrong group of /: should be adm
WARNING: Wrong permissions of /etc/ssh/sshd_config: should be 644
WARNING: Wrong permissions of /home/theo: should be 755
WARNING: Wrong permissions of /root: should be 700
WARNING: Wrong permissions of /var/spool/mail: should be 2775


10) I can only get audio back (or at least make the sound icon display a sound device) when I log on as root and run pulseaudio in a terminal.

11) Running Discover with my regular user results in a pop-up window with an error about not being able to obtain authentication
Code: Select all
Error
Failed to obtain authentication


12) It seems any system-level binary (or anything that needs to touch system configs) now requires elevated privileges (i.e., sudo), where no sudo was needed before. As an example, poweroff now fails if run with my regular user. Even shutting down my system from the gui menu does not work anymore, and it results in the Mageia logo waiting endlessly (I switch to a virtual console ctr+alt+F3 and log on as my regular user and sudo poweroff to finally shutdown my laptop)
Code: Select all
$ poweroff
Call to PowerOff failed: Interactive authentication required.


13) I noticed systemd/users is empty.

Code: Select all
[theo@localhost ~]$ grep -i state /run/systemd/users/$(id -u)
grep: /run/systemd/users/1000: No such file or directory

[theo@localhost ~]$ ls -al /run/systemd/users/
total 0
drwxr-xr-x  2 root root  40 Feb  4 12:12 ./
drwxr-xr-x 22 root root 540 Feb  4 12:12 ../


14) polkitd seems to be running (though not sure if running correctly), but I don't see the agent loaded/running

Code: Select all
[theo@localhost ~]$ ps -ef|grep -v grep|grep -iE "polkit|policykit"
polkitd     1707       1  0 12:12 ?        00:00:00 /usr/lib/polkit-1/polkitd --no-debug


15) Running polkit agent manually results in a critical error

Code: Select all
[theo@localhost ~]$ /usr/libexec/polkit-kde-authentication-agent-1
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-theo'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-theo'
"Cannot create unix session: No session for pid 8500"

** (process:8500): CRITICAL **: 12:58:56.814: polkit_agent_listener_register_with_options: assertion 'POLKIT_IS_SUBJECT (subject)' failed
"Cannot register authentication agent!"
Couldn't register listener!


16) I also noticed "systemctl --user" fails

Code: Select all
[theo@localhost ~]$ systemctl --user
Failed to list units: Process org.freedesktop.systemd1 exited with status 1

17) It seems "systemctl --user" failure is due to XDG_SESSION_ID being empty

Code: Select all
[theo@localhost ~]$ echo $XDG_SESSION_ID



18) I noticed there are no active sessions. Side note: I wonder if this is the reason for the critical error above (#15)...or perhaps all the way around (#15 being the reason for no active sessions)
Code: Select all
[theo@localhost ~]$ loginctl list-sessions
No sessions.


19) More weird stuff
Code: Select all
[theo@localhost ~]$ loginctl session-status
Could not get properties: Unknown object '/org/freedesktop/login1/session/auto'.


I may be wrong but I strongly suspect a problem with permissions or privileges or polkit, but I don't know how to tackle them.
Any help would be greatly appreciated :roll:
Last edited by TheoSchmidt on Feb 5th, '26, 21:26, edited 1 time in total.
TheoSchmidt
 
Posts: 3
Joined: May 23rd, '20, 09:33

Re: Permissions / privileges messed up after software update

Postby morgano » Feb 5th, '26, 20:18

Hm so many problems...

To start with, have you checked the S.M.A.R.T status of the disk and also run suitable file check?

Also boot into RAM check and let it run overnight. (I.e boot a Mageia ISO where you can select to check RAM)
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T43, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox
morgano
 
Posts: 1595
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Permissions / privileges messed up after software update

Postby TheoSchmidt » Feb 5th, '26, 21:21

EUREKA!!!
After a thorough analysis (yes! two days) I found the culprit: systemd

SOLUTION
Just to wrap up, some XDG variables not being set + no active sessions made me realize logingctl (and its partners in crime for session & auth management) could be causing the problem. Therefore, I reinstalled all systemd-related packages.

1) Checking for all systemd-related packages:
Code: Select all
[theo@localhost ~]$ rpm -qa *systemd*
lib64systemd0-253.33-1.mga9
systemd-devel-253.33-1.mga9
systemd-253.33-1.mga9
rpm-plugin-systemd-inhibit-4.18.2-1.mga9
libsystemd0-253.33-1.mga9


2) Reinstalling packages
Code: Select all
sudo urpmi --replacepkgs --clean rpm-plugin-systemd-inhibit lib64systemd0 systemd systemd-devel libsystemd0


3) After the proper reboot given systemd reinstall, everything came back to normal (...including audio device!!!! yahooooo!!!)
Code: Select all
[theo@localhost ~]$ loginctl list-sessions
SESSION  UID USER SEAT  TTY
     c2 1000 theo seat0 tty2

1 sessions listed.


AFTERMATH
As for what was the set of actions that caused systemd to become corrupt in the first place I'm not certain. But what I can say though is that before the fatal reboot that broke my system drakconf had prompted me to update glibc from version 2.36-57 to version 2.36-59, which I did, and also installed docker & docker-compose. There could be an installation bug in that specific scenario, but that's a rabbit hole I don't wanna fall into right now as I've spent two full days recovering my work laptop!

I'll mark this post as SOLVED and will leave this thread for future reference.
TheoSchmidt
 
Posts: 3
Joined: May 23rd, '20, 09:33

Re: [SOLVED] Permissions / privileges messed up after SW upd

Postby morgano » Feb 5th, '26, 22:09

Congratulations, well done :-)
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T43, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox
morgano
 
Posts: 1595
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest