[SOLVED] eliminate password popup when thumbdrive plugged-in

Kernels & Hardware, configuring network, installing services

[SOLVED] eliminate password popup when thumbdrive plugged-in

Postby jaja » 2017-11-03 04:38

Hello, and thanks for the help.

When I plugin a USB thumbdrive, then select "Open with File Manager"; a popup appears asking for the root password.
This popup does NOT appear in Jessie. It only appears in Stretch.

The popup message is:
Run as root -- KDE su
The action you requested needs root
privileges. Please enter root's password
below or click ignore to continues with your
current privileges.
Command: /usr/bin/dolphin /media/user/USB_NAME
Password:
OK Ignore Cancel

If I select "Ignore", Dolphin opens and functions as it did in Jessie.

Why am I getting this popup message?
How do I prevent it from appearing whenever I plugin a thumbdrive?

Thanks for the help.
Last edited by jaja on 2017-11-04 05:24, edited 1 time in total.
jaja
 
Posts: 17
Joined: 2016-01-25 00:20

Re: Eliminate root password popup when plugging in thumbdriv

Postby debiman » 2017-11-03 05:46

does it happen with any thumbdrive?
did you format the drive yourself? what filesystem, and is it maybe root owned?
User avatar
debiman
 
Posts: 1512
Joined: 2013-03-12 07:18

Re: Eliminate root password popup when plugging in thumbdriv

Postby jaja » 2017-11-03 06:17

Hello debiman,

I tested with an assortment of thumbdrives.
I formatted some of these thumbdrives. Others came pre-formatted. The remainder are from images.
The filesystems include FAT16, FAT32, and EXT2.
They were made on both Windows and Linux computers.
In every case, the popup always appears.
That's how I concluded it was an OS problem, not a thumbdrive problem.

Thanks for your help.
jaja
 
Posts: 17
Joined: 2016-01-25 00:20

Re: Eliminate root password popup when plugging in thumbdriv

Postby Head_on_a_Stick » 2017-11-03 06:38

jaja wrote:How do I prevent it from appearing whenever I plugin a thumbdrive?

In BunsenLabs we use this file:
Code: Select all
[Local Users]
Identity=unix-group:*
Action=org.freedesktop.udisks2.*
ResultAny=no
ResultInactive=no
ResultActive=yes

@ /etc/polkit-1/localauthority/50-local.d/10-udisks.pkla

I have no idea if this will work in KDE :)
"Only the mediocre are always at their best." — Jean Giraudoux
User avatar
Head_on_a_Stick
 
Posts: 6666
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Eliminate root password popup when plugging in thumbdriv

Postby jaja » 2017-11-03 07:43

Hello Head_on_a_Stick,
I tried adding your file, rebooting, and testing.
The problem remains.
Thanks for taking a shot.
jaja
 
Posts: 17
Joined: 2016-01-25 00:20

Re: Eliminate root password popup when plugging in thumbdriv

Postby pylkko » 2017-11-03 08:37

I believe what is happening is that the default udisk/udev rule is set to mount foreign (no Linux permissions, like FAT32) usb mass storage devices so that only root can access them. If this is indeed the case, then there are two possible solutions: 1) change the mount settings for the device or 2) permanently allow any such device to be mounted with full access to all users

You can set the rule for an individual device in fstab. I haven't used KDE in while, but on GNOME there is utility called "disks" where you can set the mount settings for a device. You can add "user" to the line of arguments already there. After this, that particular drive will be mounted always so that all users can access it. It modifies fstab in the background.

The other way is, AFAIK, done using polkit or policykit. Bunsenlabs rules look like policykit, perhaps KDE Debian is on polkit? Are there differences in the rules files, syntax, location? I have no idea.

https://manpages.debian.org/stretch/pol ... .8.en.html

http://storaged.org/doc/udisks2-api/lat ... tions.html
User avatar
pylkko
 
Posts: 1174
Joined: 2014-11-06 19:02

Re: Eliminate root password popup when plugging in thumbdriv

Postby jaja » 2017-11-04 05:20

I found the cause of the problem, and a solution.

Cause: In KDE5, if the user makes a COPY of Dolphin that runs as root, then KDE5 will change the default "File Manager" to this COPY. (Is this action a bug or a "feature"? KDE5 makes the change *WITHOUT* notifying the user. Therefore, I think it's a bug.) When the user then plugs-in a thumbdrive, KDE5 will attempt to access it using the COPY of Dolphin running as root. Hence, the popup asking for the root password.

Solution: After creating the COPY of Dolphin, reset the default "File Manager" to the ORIGINAL Dolphin.

Examples:
* Cause of the problem [create "Dolphin (as root)"]:
- <right click>K->Edit Applications...
- <select>System/Dolphin (File Manager)
- Copy
- Paste
- General tab
- Name: Dolphin (as root)
- Advanced tab
- [CHECK] Run as a different user
- Username: <BLANK or "root">
- Save

* Solution [reset default "File Manager" to the ORIGINAL Dolphin]:
- K->Settings->System Settings
- Applications
- Default Applications tab
- File Manager
- [CHECK] Dolphin <- NOTE: "Dolphin", *NOT* "Dolphin (as root)"
- Apply

Everyone, thank you your efforts. I appreciate it.
jaja
 
Posts: 17
Joined: 2016-01-25 00:20


Return to System configuration

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable