KDE: Admin Password when mounting encrypted additional drive

Everytime I want to mount an additional drive (second internal HDD or external HDD),

  1. a dialog with the (already filled in) encryption password shows up (OK button confirmation is annoying but easy)
  2. a second dialog shows up, asking to ENTER my account Passwort

I have tried other Distributions:
Kubuntu: only 1. Dialog
Linux Mint Cinnamon: No Dialog at all: as simple klick in sidepanel and the HDD is accessible

so I assume, that Ubuntu/Debian based Systems with KDE don´t need the second Dialog (typing account password), while fedora is the only distribution that needs it.

Is there any possible Setting that prevents those annoying dialogs? I have 3 additional HDDs and on every boot I have to fight with 6 dialogs (2 per HDD).

1 Like
  1. It appears you have the drives encrypted – which would account for the first prompt.
  2. It appears that they are mounting using root privileges – which accounts for the second prompt where it is asking for admin privileges to perform the mount.

The second may be caused by the necessity for the first. Normally udev mounts removable drives under /run/media/USER/driveID and does not require admin privileges.

Each drive does require to be unlocked if it is encrypted.
If the drive is not automatically mounted by an entry in /etc/fstab then it does require special user action if encrypted (and may require to be unlocked no matter where it is mounted)

Place this polkit rule in /etc/polkit-1/rules.d

wget https://raw.githubusercontent.com/boredsquirrel/Linux/refs/heads/main/polkit/99-udisks2.rules

run0 mkdir /etc/polkit-1/rules.d

run0 mv 99-udisks2.rules /etc/polkit-1/rules.d

systemctl reload polkit

If your user is not in the wheel group, follow this guide on how to use a dedicated group

Note that you only need to enter such a password if the disk is recognized as “internal”. External disks (like USB adapters or flashdrives) dont need a password, for whatever reason.

This is why my change proposal back then was rejected, I think.

If your external drive is not recognized as external, this is a bug and should be reported. Not sure where though, udev?

2 Likes

Thank you both for your answers.
Will try it!