This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDE Mount partitions without password

Tags: None
(comma "," separated)
ljones
Registered Member
Posts
13
Karma
0
Hello all!

Is there any way within KDE to mount partitions (using dolphin) without a password at all? I'm using debian stretch (I understand this is in development) and according to plasmashell;

Code: Select all
$ plasmashell --version
plasmashell 5.6.5


Kernel version btw is 4.6.0-1-amd64 .

BTW This a normal x86-64 bit desktop. I'm booting from an SSD with 4 partitions on; one is the system (debian stretch/kde); another is /home and then two other partitions.

This is a new install btw but the problem is that I have two extra partitions on my SSD that I'm booting from. They show up in KDE fine, though if I click on them I get prompted for the system password every time. I understand I could just do this by putting the relevent lines in my /etc/fstab, but isn't editing /etc/fstab "wrong" in some way or out of date?

I did even try to automount the devices at boot by using System settings/Removable devices and checked "Enable automatic mounting of removable media" and "Mount all removable media at login","Automatically mount removable media when attached". In the "device overrides" window the partitions on the SSD are listed and I have these checked too. Though ..... the partitions aren't mounted; I get the message asking for a password first.

I've also looked around on the 'net to try to find a solution, and while I can find some the solutions I've found don't work, and are typically quite old and out of date (e.g. from 2012 or 2010) :-( .

Thanks for any help!

ljones
User avatar
Rog131
Registered Member
Posts
828
Karma
10
Depending your polkit version

Your version:
Code: Select all
$ pkaction --version


if older than 0.106 then (maybe): http://askubuntu.com/questions/185718/a ... a-nautilus

if at least 0.106 then (working at here): https://gist.github.com/grawity/3886114 -> https://gist.github.com/grawity/3886114 ... nternal-js
ljones
Registered Member
Posts
13
Karma
0
Intresting :-) though I must confess I know nothing of policykit. Good news - it worked! But here's what I tried;

Code: Select all
$ pkaction --version
pkaction version 0.105


So I tried the first link ( http://askubuntu.com/questions/185718/a ... a-nautilus ) since I'm "just one" under version 0.106. That post suggested three methods. "By giving privilege to a group","By giving privilege to specific user" and "By giving privilege to all users".

I chose the second one - "By giving privilege to a specific user". That post suggested:

Code: Select all
 gksu gedit /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla


and

Code: Select all
[Mounting, checking, etc. of internal drives]
Identity=unix-group:admin;unix-group:sudo;unix-user:tester;
Action=org.freedesktop.udisks.filesystem-*;org.freedesktop.udisks.drive-ata-smart*
ResultActive=yes


Unfortunatly, since I'm not using ubuntu that file didn't exist. In fact all I have are three files - "geoclue-2.0.pkla","org.freedesktop.NetworkManager.pkla" and "org.freedesktop.packagekit.pkla". None of those seemed to tie up with that file as those are for geoclue (no idea), networkmanager and upgrading the system. So I tried creating

Code: Select all
$ su root
$ cd /var/lib/polkit-1/localauthority/10-vendor.d
$ nano com.debian.desktop.pkla


I then added in that code above where it says mounting in square brackets, and changed the user "tester" to my user (as a test user called "aaaaa"). And .... it didn't work. :-(

So I figured that maybe debian was doing something completely different. Maybe I had the wrong filename? Or maybe debian dosen't use policykit in this way? So instead I got rid of that file and;

Code: Select all
$ su root
$ cd /var/lib/polkit-1/localauthority/10-vendor.d
$ nano 10-desktop.policy.pkla

(I used the 10-desktop.policy.pkla name after reading this website - https://www.freedesktop.org/software/po ... ity.8.html ).

Into 10-desktop.policy.pkla I put;

Code: Select all
[Mounting, checking, etc. of internal drives]
Identity=unix-group:admin;unix-group:sudo;unix-user:aaaaa;
Action=org.freedesktop.udisks2.filesystem-*;org.freedesktop.udisks2.drive-ata-smart*
ResultActive=yes


Note the user "aaaaa" again (after unix-user). But this time I changed the place where it says "udisks" to "udisks2", as I dimly recalled that debian was using udisks2. Saved it and then rebooted.

And that seemed to work!

Now all I have to do is to fix my other problem (which I don't think is related) and that's a problem with nfs:// and dolphin ....

ljones


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], q.ignora, watchstar