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

 

 

 

[SOLVED] eliminate password popup when thumbdrive plugged-in

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
jaja
Posts: 53
Joined: 2016-01-25 00:20
Has thanked: 1 time

[SOLVED] eliminate password popup when thumbdrive plugged-in

#1 Post by jaja »

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.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Eliminate root password popup when plugging in thumbdriv

#2 Post by debiman »

does it happen with any thumbdrive?
did you format the drive yourself? what filesystem, and is it maybe root owned?

jaja
Posts: 53
Joined: 2016-01-25 00:20
Has thanked: 1 time

Re: Eliminate root password popup when plugging in thumbdriv

#3 Post by jaja »

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.

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: Eliminate root password popup when plugging in thumbdriv

#4 Post by Head_on_a_Stick »

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 :)
deadbang

jaja
Posts: 53
Joined: 2016-01-25 00:20
Has thanked: 1 time

Re: Eliminate root password popup when plugging in thumbdriv

#5 Post by jaja »

Hello Head_on_a_Stick,
I tried adding your file, rebooting, and testing.
The problem remains.
Thanks for taking a shot.

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

Re: Eliminate root password popup when plugging in thumbdriv

#6 Post by pylkko »

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

jaja
Posts: 53
Joined: 2016-01-25 00:20
Has thanked: 1 time

Re: Eliminate root password popup when plugging in thumbdriv

#7 Post by jaja »

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.

Post Reply