0

I have several internal nvme drives and I discovered they weren't mounted. I couldn't get them to mount using "disks" because I'm "not authorized to perform operation". My account belongs to the adm and sudo groups so I can't figure out why it wouldn't let me. When I open the terminal and log into root I can mount the drives so I think its a permission issue but I don't know why. This is on Ubuntu 22.04.

The only thing I can think of is that because I'm connecting remotely using Windows Remote Desktop through XRDP/XCFE there must be some restrictions that a local user doesn't face. I can't find any references on the internet, can someone help with this?

  • I don't use Xubuntu, but I use XRDP with Ubuntu 22.04. I usually get a password prompt when I open the Gnome Disks app remotely using XRDP. This does not happen if I am in front of the computer. May be AppArmor is not configured for admin type operations using XRDP. I have no idea how to fix it. – user68186 Sep 28 '23 at 15:30

1 Answers1

0

Again, just a guess here..(because we never encountered the issue)

Possible Issue

This seems to be related to the Polkit engine. When accessing your machine remotely, some actions might be blocked by the polkit package which is basically an autorization framework...

The symptoms look similar to the issue described in our blog in this post and can also relate to this askubuntu topic

Possible Fix

You need to create a exception rule for managing disks by following these instructions

#create a pkla file 
sudo touch /etc/polkit-1/localauthority/50-local.d/48-udisks.pkla

#open/edit the file as sudo sudo nano /etc/polkit-1/localauthority/50-local.d/48-udisks.pkla

#Copy the code below into the file and save it

[udisks] Identity=unix-group:* Action=org.freedesktop.udisks2.* ResultAny=yes ResultInactive=yes ResultActive=yes

In this file, we are basically allowing all actions related to disk management when connected via remote desktop. If you want to limit which actions are allowed for the users, you can try to list what's available by issuing the following command in a Terminal console

pkaction | grep disk 

Not sure if this will fix the issue but you can give it a try...

Hope this help Till next time

Griffon
  • 2,375