Bug 274842 - KDE Daemon asks for password to access dmcrypt/LVM harddisk
Summary: KDE Daemon asks for password to access dmcrypt/LVM harddisk
Status: RESOLVED UNMAINTAINED
Alias: None
Product: solid
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: 4.11
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-03 14:53 UTC by Bzzz
Modified: 2018-09-04 15:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
etc mtab (766 bytes, application/octet-stream)
2011-06-03 14:53 UTC, Bzzz
Details
etc fstab (780 bytes, application/octet-stream)
2011-06-03 14:55 UTC, Bzzz
Details
output of sudo lvdisplay (1.41 KB, application/octet-stream)
2011-06-03 14:56 UTC, Bzzz
Details
output of solid-hardware list details at login (27.73 KB, application/octet-stream)
2011-06-03 15:04 UTC, Bzzz
Details
Image showing the password request (Norwegian Nynorsk localisation) (26.93 KB, image/png)
2011-11-25 08:28 UTC, Karl Ove Hufthammer
Details
kdelibs patch (611 bytes, patch)
2013-03-06 22:48 UTC, Alex Fiestas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bzzz 2011-06-03 14:53:46 UTC
Created attachment 60583 [details]
etc mtab

Version:           unspecified (using KDE 4.6.2) 
OS:                Linux

Like in bug Bug 240014, a window pops up at every start, demanding a password for something hdd-related (no further description). It accepts any password without further response, and it ignores the "save pw" feature that is offered in that dialogue. I haven't experienced that in my previous install of Kubuntu, which was an upgraded Natty Beta 2. My current config is very similar to that, except of some different partition sizes and the Natty Final install media.

Reproducible: Always

Steps to Reproduce:
Shut down, start again, log in

Actual Results:  
dialogue appears

Expected Results:  
Nothing or just appearing once and keeping the given password when using the "save password" checkbox

I'll add the files that were requested in bug 240014.
Comment 1 Bzzz 2011-06-03 14:55:03 UTC
Created attachment 60584 [details]
etc fstab
Comment 2 Bzzz 2011-06-03 14:56:15 UTC
Created attachment 60585 [details]
output of sudo lvdisplay
Comment 3 Bzzz 2011-06-03 15:04:40 UTC
Created attachment 60586 [details]
output of solid-hardware list details at login
Comment 4 Karl Ove Hufthammer 2011-11-25 08:24:54 UTC
I have the same problem, running openSUSE 12.1 (the problem also occured in openSUSE 11.4). Every time I log in, I get a dialogue asking for the password of my hard drive. It’s not actually necessary to enter anything, as my drive is already decrypted, and I can successfully log in just leaving the dialogue open. And even if I enter a password and check the ‘Store Password’ checkbox, the dialogue reappears the next time I try to log in.

I only have my ‘home’ partition encrypted on my system (set to /dev/mapper/cr_sda8 in fstab), and this is unlocked by inputting my password when booting the system, long before KDE is started.
Comment 5 Karl Ove Hufthammer 2011-11-25 08:28:28 UTC
Created attachment 66058 [details]
Image showing the password request (Norwegian Nynorsk localisation)
Comment 6 Alex Fiestas 2012-10-08 09:10:35 UTC
So the bug here is what kded is asking for a password of a disk that is already mounted? or you don't have any encrypted device at all?

The files you've attached show at least one encrypted device.

Let's see if we can clear this out :p
Comment 7 Bzzz 2012-10-08 13:32:13 UTC
 As of today, I have an encrypted SSD drive, which contains partitions equal to those on the previous hard disk. In fact, I just dd'ed them.
Furthermore, I now have a dual-SDXC card reader installed, which has 2x 32GB in it. It also contains an encrypted LVM over both cards, but it only has a single partition in it.

The dialogue now says: '' needs a password to be accessed. So I guess it's no longer the system partitions that cause something, but the card reader. All directories are mounted and accessible before clicking OK or Cancel.
Comment 8 Alex Fiestas 2012-10-08 16:25:33 UTC
Do you have the following ernabled?
System settings->Removable devices ->Enable automatic mounting...]

Thanks !
(In reply to comment #7)
>  As of today, I have an encrypted SSD drive, which contains partitions equal
> to those on the previous hard disk. In fact, I just dd'ed them.
> Furthermore, I now have a dual-SDXC card reader installed, which has 2x 32GB
> in it. It also contains an encrypted LVM over both cards, but it only has a
> single partition in it.
> 
> The dialogue now says: '' needs a password to be accessed. So I guess it's
> no longer the system partitions that cause something, but the card reader.
> All directories are mounted and accessible before clicking OK or Cancel.
Comment 9 Bzzz 2012-10-08 16:37:50 UTC
Yes, that is fully enabled (main checkbox and the three ones below)

Device overrides are only checked for some USB media that is listed in the Disconnected Devices section. All Attached Devices have no override checked.
Comment 10 Alex Fiestas 2012-10-08 18:23:39 UTC
(In reply to comment #9)
> Yes, that is fully enabled (main checkbox and the three ones below)
> 
> Device overrides are only checked for some USB media that is listed in the
> Disconnected Devices section. All Attached Devices have no override checked.

and are you using it? can you check if by unchecking it the issue is solved?

thanks !
Comment 11 Bzzz 2012-10-08 19:48:22 UTC
Indeed, un-checking "Mount all removable media at login" prevents the dialogue from popping up. However, the card reader isn't mounted anymore (only manually via palimpsest or the like), which isn't an option for me. I think I didn't reboot in Comment #7, I was just checking for the exact text. 
So...I need the auto-mounting feature back, as a backup cronjob needs to place files there.
Comment 12 Alex Fiestas 2012-10-08 20:41:21 UTC
(In reply to comment #11)
> Indeed, un-checking "Mount all removable media at login" prevents the
> dialogue from popping up. However, the card reader isn't mounted anymore
> (only manually via palimpsest or the like), which isn't an option for me. I
> think I didn't reboot in Comment #7, I was just checking for the exact text. 
> So...I need the auto-mounting feature back, as a backup cronjob needs to
> place files there.

Then, it was asking for the disk password even though it already mounted the disk without it?

I have to confess, I have no experience with LUKS encryption, so you will have to help me (and I'm not the developer of that code xD).

How is it possible that the partitions are mounted without you having to introduce the password? is this daemon keeping it in KWallet? is this something you want to?

From here, it seems that the daemon is trying to mount it again, and on failing (because it is already mounted) asking you the password.
Comment 13 Bzzz 2012-10-08 20:52:07 UTC
It was already mounted, but it asked again. Like before when only the HDD was installed and of course /home/ was already mounted, but it asked again. I don't know if I can catch the error messages afterwards if there are any, at least there is nothing in the GUI.

Well, if I check the settings like they were before, reboot and click away the popup, the folder isn't mounted. The whole path inside /media is missing then. So the password is likely saved in something behind this prompt. 
palimpsest uses another pw storage, as I had to enter it there - offering the options to keep that in a database or forget about it immediately. I chose to save it, and when unmounting and remounting, palimpsest now doesn't ask again.
Comment 14 Tim Edwards 2012-12-20 16:55:51 UTC
I had the same problem, I'd get the KDE Daemon password prompt for the two encrypted partitions on this computer. This is despite the fact that the entire system (except /boot) is on these encrypted partitions and so I'd already been prompted from the password during boot to unlock the partitions so the system could boot. In other words there's no need for KDED to try opening these partitions itself.

Anyway a workaround I found was to delete the file .kde/share/config/kded_device_automounterrc. This is the history of removeable devices that KDE knows about. You then need to re-enable automatic mounting in System Settings->Removable Devices. Seen on KDE 4.8.5 on Ubuntu 12.04.
Comment 15 Alex Fiestas 2013-02-24 13:59:13 UTC
Pse, I want to polish/rewrite/fix kded automonter in the incoming weeks, will try to fix this issue before I do anything else.

Changing status to Confirmed.
Comment 16 Alex Fiestas 2013-03-06 22:48:26 UTC
Created attachment 77820 [details]
kdelibs patch
Comment 17 Alex Fiestas 2013-03-06 22:51:20 UTC
Attached patch that fixes this in udisk1 I think, it basically checks if the device is accessible before requesting the password.

What I think that is happening is that the "Solid automonter" is calling setup without checking if the device is actually mounted or not. Even though solid automounter is doing it wrong I believe the library should be prepare against this mistakes.

I wonder if we should put this check in a place where all backends can make use of it.

Lukás, any comments?
Comment 18 Andrew Crouthamel 2018-09-04 15:42:00 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug. Please try again with the latest version and submit a new bug to frameworks-solid if your issue persists. Thank you!