Quantcast
Channel: Active questions tagged password - Ask Ubuntu
Viewing all articles
Browse latest Browse all 337

How to make Ubuntu ask for password when mounting partitions in 24.04 Noble?

$
0
0

I have been using the following guideline (see link below) to isolate versions of Ubuntu on my rig by introducing a requirement for a password to access them (through FILES etc): How to make Ubuntu ask for password when mounting partitions? This basically modified /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla as detailed in this question. (See the link for details.)

However, this doesn't now seem to work for the latest OS Noble Numbat 24.04.Can someone suggest what I might be doing wrong and/or suggest another way to do this.

Thanks.


I have been trying to make a comparison between 22.04 (work) and 24.04 (doesn't work). My conclusion is that polkit is not working (24.04) when I have modified the /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla as described above. As a test I run the following on 22.04 and then 24.04: -

pkcheck -u --process $$ --action-id org.freedesktop.udisks2.filesystem-mount-system

For 22.04 it shows the 'Authentication Request' Splash and for 24.04 it doesn't.

pkaction --verbose --action-id org.freedesktop.udisks2.filesystem-mount-system

Is the same for 22.04 & 24.04

systemctl status polkit.service

Is more or less the same for 22.04 and 24.04 expect the locale is difference en_GB.UTF-8 (22.04) & en_US.UTF-8 (24.04). Could this affect it is somehow, perhaps?

sudo systemctl | grep running | grep polkitpolkit.service    loaded active running   Authorization Manager

for both 22.04 & 24.04

Any ideas?

Thanks.

I have added some debugging to CLib using information from: -

https://wiki.ubuntu.com/DebuggingPolicykit

When running

pkcheck -u --process $$ --action-id org.freedesktop.udisks2.filesystem-mount-system

I get the following report: -

GLib-GIO-DEBUG: 14:05:26.841: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)

I couldn't work out what version of GDBus 24.04 was using, sorry. I thought is might help shed some light on the problem.

Having added some debugging (& still not working) I will now add the output of: -

 systemctl status polkit.serviceStarting polkit.service - Authorization Manager...Started polkitd version 124Loading rules from directory /etc/polkit-1/rules.dLoading rules from directory /usr/share/polkit-1/rules.dFinished loading, compiling and executing 16 rulesStarted polkit.service - Authorization ManagerAcquired the name org.freedesktop.PolicyKit1 on the system busRegistered Authentication Agent for unix-session:c1 (system bus name :1.43 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)Registered Authentication Agent for unix-session:3 (system bus name :1.81 [/usr/bin/gnome-shell], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)Unregistered Authentication Agent for unix-session:c1 (system bus name :1.43, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)  (disconnected from bus)

Contents of: -ls -al /usr/share/polkit-1/rules.d/

I have added this as I wonder if one of the files, perhaps, should not be there. I looked in com.ubuntu.desktop.rules and I think I counted 8 rules (8 methods?) so I suspect the others are from the other files (?).

-rw-r--r-- 1 root root 1176 Apr 12 07:51 20-gnome-initial-setup.rules-rw-r--r-- 1 root root  104 Apr  3 19:26 49-ubuntu-admin.rules-rw-r--r-- 1 root root  325 Apr  3 19:26 50-default.rules-rw-r--r-- 1 root root 3373 Jun  5  2023 com.ubuntu.desktop.rules-rw-r--r-- 1 root root  523 Apr  8 16:58 gamemode.rules-rw-r--r-- 1 root root  556 Apr 18 17:54 gnome-control-center.rules-rw-r--r-- 1 root root  182 Mar 31 00:24 org.a11y.brlapi.rules-rw-r--r-- 1 root root  368 Apr  1 19:13 org.freedesktop.bolt.rules-rw-r--r-- 1 root root  251 Apr  5 12:36 org.freedesktop.fwupd.rules-rw-r--r-- 1 root root  287 Apr  8 15:39 org.freedesktop.GeoClue2.rules-rw-r--r-- 1 root root  282 Apr  4 19:48 org.freedesktop.NetworkManager.rules-rw-r--r-- 1 root root  334 Mar 31 09:13 org.freedesktop.packagekit.rules-rw-r--r-- 1 root root  594 Apr 18 14:39 org.gtk.vfs.file-operations.rules-rw-r--r-- 1 root root  519 Apr 16 10:55 sssd-pcsc.rules-rw-r--r-- 1 root root  527 Feb 27 17:26 systemd-networkd.rules

Viewing all articles
Browse latest Browse all 337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>