Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Thunar asks for root password to mount an encrypted HDD

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
eddie3000
Posts: 21
Joined: 2020-04-26 07:22

Thunar asks for root password to mount an encrypted HDD

#1 Post by eddie3000 »

Hello, I am new to this forum. I have just installed debian 10 on my laptop, and intend to keep it that way.

I have an encrypted drive. Every time I want to mount it, I enter my passphrase, but thunar also insists in asking for my root password every time, which seems a bit inconvenient.

I googled and found that if I edit the file /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy, and change <allow_active>auth_admin_keep</allow_active> to <allow_active>yes</allow_active> under the text block <action id="org.freedesktop.udisks2.filesystem-mount-system">, it would solve my problem. But this is not the case. It still wants the root password to mount the volume.

What am I doing wrong? Is it because of my drive being encrypted?

Thanks.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Thunar asks for root password to mount an encrypted HDD

#2 Post by pylkko »

how are you mounting it, do you have it in fstab?

eddie3000
Posts: 21
Joined: 2020-04-26 07:22

Re: Thunar asks for root password to mount an encrypted HDD

#3 Post by eddie3000 »

No, I do not have it in fstab.

It's an encrypted volume, it's been that way for years. On linux mint or ubuntu I just clicked on the drive in the file manager to mount it, and enter the encryption key, and voilá. In debian, it also asks for the root user password which makes it a bit of a nuisance.

Anyhow, I have finally uninstalled debian 10 and opted for another ubuntu based distribution due to other problems related to lowlatency kernels and nvidia drivers not working properly togethre requiring too much indepth investigation in order to get it working promptly. All these issues work straight out of the box with this new distro. It's a shame because I was looking forward to using debian for quite a while. But I've been reading about so many people with similar problems to mine and no working solutions either have made me change my mind about debian. At least for the moment.

I must say that I have several raspbian's at home based on debian buster that do not require the root password for mounting similar encrypted drives.

Thank you very very much anyway. I might try debian on my laptop in the near future, but not now.

Cheers.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Thunar asks for root password to mount an encrypted HDD

#4 Post by pylkko »

You didn't really answer the question about how you mount the device. I meant things like what the mount point is and what command. I think you mean that you are using a desktop fle manager of some sort to do it.

There are multiple ways in which you can give normal users the permission to mount external drive filesystems/partitions. One of them is adding the "user" flag to the fstab entry (presuming the users are in the users group). Others are using policykit/udisks rules, using "sudo mount" (and allowing sudo for that command wthout password) etc....

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Thunar asks for root password to mount an encrypted HDD

#5 Post by Head_on_a_Stick »

eddie3000 wrote:I googled and found that if I edit the file /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy, and change <allow_active>auth_admin_keep</allow_active> to <allow_active>yes</allow_active> under the text block <action id="org.freedesktop.udisks2.filesystem-mount-system">, it would solve my problem. But this is not the case. It still wants the root password to mount the volume.
So you didn't scroll down in that file and see the stanzas pertaining to encrypted devices then? You shouldn't edit /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy anyway because it will be replaced if the udisks2 package is updated.

See https://github.com/coldfix/udiskie/wiki/Permissions & https://gist.github.com/grawity/3886114 ... nternal-js for some drop-in configuration examples.
eddie3000 wrote:I've been reading about so many people with similar problems to mine and no working solutions either
Yeah, lots of clueless n00bs try to run Debian and fail miserably :mrgreen:
deadbang

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Thunar asks for root password to mount an encrypted HDD

#6 Post by sunrat »

Head_on_a_Stick wrote:
eddie3000 wrote:I've been reading about so many people with similar problems to mine and no working solutions either
Yeah, lots of clueless n00bs try to run Debian and fail miserably :mrgreen:
Dinsdale was a cruel man, but fair. :wink:

I'm running Buster with a low-latency kernel (Liquorix) and Nvidia drivers. Didn't need any special tweaks or anything, just install both with apt.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

eddie3000
Posts: 21
Joined: 2020-04-26 07:22

Re: Thunar asks for root password to mount an encrypted HDD

#7 Post by eddie3000 »

As a clueless newbie to debian I decided to post in the begginers forum. As a father of quite a few I understand those who enjoy making fun of others. I quite agree it can be fun and self fullfilling. No worries though. :lol: :lol:

Anyway, I really wanted to try debian. I have a bunch of raspberries running it already. When I have time I will give it another chance later on. But I use my laptop to work, so I needed to get it up and fully running asap. All of it, not just partially.

I decided to quit linux 19 due to some bugs here and there that were not getting fixed and a few silly changes I thought were actually going against my work productivity, and my pc kept complaining in the form of constant excessive heat when idle. Reverting to mint 18 was an option, that version worked really well indeed. But I like changing distro from time to time, and quickly checking a new distro is nice as long as it doesn't take up too much time (a weekend at most).

The first issue I ran into was thunar asking for the root password. I did a little research and tried fixing it to no avail. So I posted here.
So you didn't scroll down in that file and see the stanzas pertaining to encrypted devices then?

Yes, but I didn't see it. Don't forget I'm a bit daft.

At first, apt wouldn't update nor install anything. Why the heck not? After a bit of fiddling here and there, it turns out that the sources file only pointed to an unexistant cd-image?? Isn't that silly? I looked for the default sources server list over the internet, added them to the sources file and solved that issue. But it took me a while. It is the first time I've coma across a distribution without it's default servers already there.

I installed the nvidia driver through apt, that worked fine. I installed the lowlatency driver using apt, linux-image-x.x.x.x-rt-amd64, and that stopped it working. I ended up with a black screen, no session. I could press alt+f2 and log in though. On boot I could see errors flying by, using a camera I caught "Failed to start: Load Kernel modules." and another error was "Failed to start: Nvidia persistence daemon." I probably missed some other error messages. I'm sure there's a log somewhere. I read about these two problems. Many people with no working solutions.

I also tried liquorix. It failed to work too. Same errors on boot as with the standard rt kernel.

Too many problems to solve in a weekend. So I chose anothrer distro that worked fine. Installed lowlatency driver, nvidia drivers, no fuss, and now I can get to work.

It's a pity, but when I have more time I will give debian another go. I really want it to work for me, but now I need it to just work.

Thanks for your help. Thanks for this great forum. I'll be back sooner than later.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Thunar asks for root password to mount an encrypted HDD

#8 Post by Head_on_a_Stick »

eddie3000 wrote:the sources file only pointed to an unexistant cd-image
^ This indicates that you didn't select a mirror during the installation.
deadbang

eddie3000
Posts: 21
Joined: 2020-04-26 07:22

Re: Thunar asks for root password to mount an encrypted HDD

#9 Post by eddie3000 »

Thank you for that.I'll try and remember that next time. :D
If I remember correctly, I had to perform an offline installation because my wifi wasn't detected, and I couldn't bother getting an ethernet cable.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Thunar asks for root password to mount an encrypted HDD

#10 Post by Head_on_a_Stick »

eddie3000 wrote:I had to perform an offline installation
In that situation the installer presumes that you want an off-line installation and configures the system to be able to install software from the CD/DVD drive instead. Debian is one of the only distributions to offer DVDs containing most of their software so that people without a regular internet connection can still use it. It's not a bug, it's a feature.
deadbang

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Thunar asks for root password to mount an encrypted HDD

#11 Post by sunrat »

eddie3000 wrote:I installed the lowlatency driver using apt, linux-image-x.x.x.x-rt-amd64, and that stopped it working. I ended up with a black screen, no session.
That's not a "low-latency", it's a "realtime" kernel (not "driver"). Realtime kernels just don't work with Nvidia drivers or a number of other third party kernel modules that have to be built during install.
Normally if you don't have graphics working properly after a new kernel install you can still boot the old kernel by selecting it in the Advanced options of the boot loader.
I also tried liquorix. It failed to work too. Same errors on boot as with the standard rt kernel.
Liquorix works with Nvidia driver but a very recent Liquorix may need a more recent Nvidia driver than what is available in the Debian stable repository. I actually just installed a new system a couple of days ago and the Liquorix kernel I installed (5.6.something) was too new for the stable Nvidia driver, so I installed the latest Nvidia from the backports repo and it worked nicely.

Debian is not very newbie friendly. You often need to tweak things under the hood to achieve the same functionality as some other distros have out of the box. But it's a very efficient distro, very customisable, and most rewarding once you get to know it better.
Last edited by sunrat on 2020-05-05 12:54, edited 1 time in total.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

eddie3000
Posts: 21
Joined: 2020-04-26 07:22

Re: Thunar asks for root password to mount an encrypted HDD

#12 Post by eddie3000 »

Sorry sunrat. I did mean kernel, not driver. And it's my fault for assuming that the real time kernel was equivalent to low-latency (real time is impossible in real life).

As you say, people have reported succesfully working systems with liquorix and nvidia. And yes, in my case I just didn't get the right combination of versions I guess.
Debian is one of the only distributions to offer DVDs containing most of their software so that people without a regular internet connection can still use it.
Well that is brilliant. But adding two lines of default servers for updates and the such doesn't hurt. But on the other hand it turned out to be quite educational having to fix it.
Debian is not very newbie friendly. You often need to tweak things under the hood to achieve the same functionality as some other distros have out of the box. But it's a very efficient distro, very customisable, and most rewarding once you get to know it better.
I'm still a newbie after over ten years of using linux. If I had lots of time, I would definitely have insisted with debian. But I needed my laptop for the following day, so I went astary and chose another distro. When I break thatone until the point reinstalling is faster that fixing, I will try debian again, I promise.

Post Reply