You are not logged in.

#1 2012-11-03 19:00:35

csolisr
Member
From: Costa Rica
Registered: 2012-06-10
Posts: 23
Website

GNOME 3.6 requires root password to mount any external drives

For some unknown reason, after the last update, Nautilus (the version from GNOME 3.6) requires to enter the root password (not my administrator account's password, the actual root's password) in order to mount any kind of external drive (pendrives, SD cards, etcetera). Right now I'm running with pure systemd and I already included myself as a member of the disk group. What can be causing this problem?

Offline

#2 2012-11-03 19:09:03

vishal8492
Member
Registered: 2011-12-15
Posts: 19

Re: GNOME 3.6 requires root password to mount any external drives

/usr/share/polkit-1/actions/org.freedesktop.udisks.policy

Check above file and check if you allow active is yes,if you're concerned about partitions then check for internal drive.

<action id="org.freedesktop.udisks.filesystem-mount">
    <description>Mount a device</description>
    <description xml:lang="da">Montér en enhed</description>
    <message>Authentication is required to mount the device</message>
    <message xml:lang="da">Autorisering er pÃ¥krævet for at montere et fil system</message>
    <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>
  </action>

Offline

#3 2012-11-03 19:12:04

csolisr
Member
From: Costa Rica
Registered: 2012-06-10
Posts: 23
Website

Re: GNOME 3.6 requires root password to mount any external drives

I checked the file, allow_active is set as "yes" (i.e., I haven't touched it anyhow). Still, the root issue persists.

Offline

#4 2012-11-03 20:35:27

Korat
Member
Registered: 2011-09-30
Posts: 2

Re: GNOME 3.6 requires root password to mount any external drives

Myself, I had to change all "Mount a device" to yes, but it works now in KDE.

Offline

#5 2012-11-03 21:05:34

csolisr
Member
From: Costa Rica
Registered: 2012-06-10
Posts: 23
Website

Re: GNOME 3.6 requires root password to mount any external drives

Korat wrote:

Myself, I had to change all "Mount a device" to yes, but it works now in KDE.

How did you set all "Mount a device" to yes, exactly?

Offline

#6 2012-11-03 21:22:14

opensrcrox
Member
Registered: 2012-08-10
Posts: 32

Re: GNOME 3.6 requires root password to mount any external drives

Your problem might be related to the new polkit rules ... take it as an FYI  smile
Polkit 0.107-4 uses javascript "rules" .... instead of the old pkla format.

In my case, Nautilus wanted authentication to mount internal drives.
I took care of it by creating /etc/polkit-1/rules.d/10-auth.rules with the following content :

 polkit.addRule(function(action, subject) {
               if (action.id="org.freedesktop.udisks2.filesystem-mount-system" && subject.isInGroup("storage")) {
                       return polkit.Result.YES;
                   }
               }
           );

... and that was it .. it takes effect immediately ( polkit monitors that directory, and makes changes on the fly. )

When Nautilus asks for authentication, check the specific action-id ( if different from filesystem-mount-system), and adjust accordingly.
Again, your issue might be unrelated ... but I thought this might come in handy sometime.

Offline

#7 2012-11-03 21:27:07

csolisr
Member
From: Costa Rica
Registered: 2012-06-10
Posts: 23
Website

Re: GNOME 3.6 requires root password to mount any external drives

Aaand solved! Perhaps someone should post this as a bugfix. Thanks!

Offline

#8 2016-03-24 18:32:26

pntruongan
Member
Registered: 2011-01-31
Posts: 63

Re: GNOME 3.6 requires root password to mount any external drives

opensrcrox wrote:

Your problem might be related to the new polkit rules ... take it as an FYI  smile
Polkit 0.107-4 uses javascript "rules" .... instead of the old pkla format.

In my case, Nautilus wanted authentication to mount internal drives.
I took care of it by creating /etc/polkit-1/rules.d/10-auth.rules with the following content :

 polkit.addRule(function(action, subject) {
               if (action.id="org.freedesktop.udisks2.filesystem-mount-system" && subject.isInGroup("storage")) {
                       return polkit.Result.YES;
                   }
               }
           );

... and that was it .. it takes effect immediately ( polkit monitors that directory, and makes changes on the fly. )

When Nautilus asks for authentication, check the specific action-id ( if different from filesystem-mount-system), and adjust accordingly.
Again, your issue might be unrelated ... but I thought this might come in handy sometime.

Truly sorry for kicking a dead horse here, but I encounter this problem recently (on another distro, not arch) and google point me to your post first hand. So I think it may help others coming across that while your code is... WRONG
That rule won't just only allow authentication for mounting, it will skip authentication for every action. Be cause the correct code for checking action.id is == (double equal sign), a single equal sign is an assignment is return TRUE.

Offline

#9 2016-03-24 19:23:33

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: GNOME 3.6 requires root password to mount any external drives

Thanks for clarification.


Closing.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB