Registered Member
|
Hello,
I am not able to umount any USB disk drive unless I insert the root password. Indeed I am prompted for the password request every time I try to umount the disk using the eject button from the notify area. I think that this is a configuration issue as regard my user, (i.e. something broken within the ~/.kde dir) and it has something to do with udisks. If I try to umount using udisks1 (or simply umount /dev/xxx by command line) the password is not requested while udisks2 requires the password to be inserted. If KDE would use udisks1 it would be better in this case. Do you have any suggestion to fix this problem since I am facing with this since few months? I use kde-4.10.4 on Gentoo Linux - Kernel 3.10.0. Thanks |
Administrator
|
KDE will use UDisks2 if present, otherwise it will fallback to UDisks (the original). The order of precedence usually is not noticed - as most systems only have one or the other.
With regards to why you are being prompted for authentication - this is a change in behaviour imposed by UDisks2 - which KDE has no control over. You should file a bug report against UDisks2 with your distribution. In regards to temporarily fixing it - if you expand "Details" it should give an "Action" called "org.freedesktop....". Open System Settings and use the "Actions Policy" control module to ensure the "Active console" has permission to perform the action.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Thank you for replying
Actually, I would try to fix it following your suggestion, and I see this: unfortunately I see that the message which appears hovering the mouse on "Umount a device mounted by another user" it wants me to modify the org.freedesktop.udisks2.filesystem-umount-others file, but I don't have it on my filesystem. If I click on it, nothing happens. I don't find the "Actions policy" module on my System settings. It looks like it is missing. And I see (just googling a little bit) that many other people are experiencing the same issue. I would open a bug report against UDisks2, but I guess this is happening because something within my kde configuration has been messed up (not directly by me, since I didn't touch anything). |
Registered Member
|
Well, how did you mount the drive in the first place?
If you mounted it with something other than udisks2, you have to specify the root password for unmounting with udisks2, I think. Mounting and unmounting works fine using udisks2 on my system without root password. And I haven't changed any polkit rules. I'm pretty sure that org.freedesktop.udisks2.filesystem-umount-others (which is no file btw. ) is set to auth_admin (can't check at the moment). That "Actions policy" module doesn't really work anyway because it changes wrong files. That's why it got removed in openSUSE. See https://bugs.kde.org/show_bug.cgi?id=308934 f.e. AFAIK this is decided at compile time. If your KDE is compiled against UDisks2 it won't use UDisks and vice versa... |
Registered Member
|
Hi,
I mounted the device without doing anything particular. When I plug in the usb drive, the popup appears on top of the clock/icon/notification area and it is automatically mounted. So, just the "eject" button is available. I also noticed some strange behaviour in this case because automatic mounting is not enabled in System Settings and it automatically mounts the devices anyway. If I do this by command line:
I am able to umount as user while this:
makes the password request window visible. So, I guess the device gets mounted with udisks1 and KDE is trying to umount it using udisks2. But at this point: why is KDE using udisks1 to mount and udisks2 to umount? |
Registered Member
|
That's not KDE4, that must be something else then. But I have no experience with Gentoo, so I have no idea what that could be. Maybe udisks-glue? AFAIK that's for automounting with udisks1. You could try to uninstall udisks, then it should work. At least you would see what requires udisks on your system... |
Registered Member
|
Well,
I can answer your question right away:
I don't think it would be appropriate to remove udisks1. |
Registered Member
|
Well, then I think udisks-glue is automounting your drive as I already mentioned. I guess you have the following choices: - disable automounting with udisks-glue (or uninstall it completely) - recompile KDE to use udisks-1.0 (AFAIK udisks2 support is enabled by defining WITH_SOLID_UDISKS2=TRUE when building kdelibs) - set the polkit rule 'org.freedesktop.udisks2.filesystem-umount-others' to yes. on openSUSE you would add the following line to /etc/polkit-default-privs.local :
|
Registered Member
|
OK, I think the two best solutions for me are 1 and 3.
I would try solution 3 replacing the following piece of code in /usr/share/polkit-1/actions/org.freedesktop.udisks.policy:
with this:
But I don't have the executable you mentioned: "set_polkit_default_privs". To be honest, I remeber that I've already tried to do this, but it didn't work. Let's try again then. As for the solution 1, I don't know how to do it. Thank you! |
Registered Member
|
That may be openSUSE specific then. What polkit-related things do you have in /etc?
And which polkit version do you have? There were massive changes between versions. You shouldn't change the defaults in /usr/share/polkit-1/actions/. Your changes there would get lost if you reinstall/update udisks2. They get overridden by the settings in /etc/ anyway. And you showed the wrong one in your last post. That was for udisks-1.0... For udisks2 it should have been /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy. And you should especially change <allow_active> to yes. That's the one that affects you. |
Registered Member
|
And this is the content of /etc/polkit-1/rules.d/50-default.rules:
OK, yes, I know indeed. It was just an attempt, and it didn't work, even after a reboot.
Ops, this may explain why my attempt was unsuccessful. I try with the right file now. But this is the related piece of xml:
How should this be changed for testing? Do I set yes to them all? |
Registered Member
|
Ok, so you don't have specific rule settings in /etc. In openSUSE there's /etc/polkit-default-privs.standard and /etc/polkit-default-privs.restrictive with the distributions default privilege settings, and /etc/polkit-default-privs.local where the local administrator can override those. "set_polkit_default_privs" then generates the file /etc/polkit-1/rules.d/90-default-privs.rules out of them, which then contains the actual polkit rules config.
Yes. Like this:
Well, actually the last one should suffice since when you are logged into KDE you should have an "active" console... |
Registered Member
|
The change did work!!!
Now, according to this Wiki, I should find the right rule to be added in the /etc/polkit-1/rules.d/50-default.rules file in order to override the default setting in the file I've changed for testing. EDIT: I must not edit that file.. as mentioned in it |
Registered Member
|
Create a file /etc/polkit-1/rules.d/10-udisks2.rules with the following content:
Then all users on your system should be able to unmount drives other users (or other programs than udisks2) mounted. Of course you could restrict that for certain users or certain groups as explained in that Wiki article. http://wiki.gentoo.org/wiki/Polkit#Rules On openSUSE "set_polkit_default_privs" does create similar javascript snipplets in /etc/polkit-1/rules.d/90-default-privs.rules. |
Registered Member
|
Thank you so much. This solved the problem.
Great! |
Registered users: Bing [Bot], Evergrowing, Google [Bot]