15

My Ubuntu 14.04 is asking for my password to mount or unmount an USB stick. How can I change it, so that the mount is automatic and no password input is required ?

This is about mounting arbitrary USB sticks in /media, there is no entry in /etc/fstab. My user is in the 'plugdev' group, but the password prompt is pupping up anyway.

12

Try this. Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo gedit /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy

When it opens look for

<action id="org.freedesktop.udisks2.filesystem-unmount-others">
<defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
</defaults>

And change it to

<action id="org.freedesktop.udisks2.filesystem-unmount-others">
<defaults>
      <allow_any>yes</allow_any>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
</defaults>
  • 3
    Follow up question: I see that this string <allow_active>... shows up 29 times in that files - do you recommend to replace them all; if not; which section is the correct one to update? – GhostCat Jul 29 '15 at 14:31
  • 1
    Thanks. Please could someone advise if there is a way to edit this in a user-friendly manner? The XML seems to be designed to have a front-end, doesn't it? – Sanjay Manohar Aug 13 '15 at 13:36
  • Also, does anyone know what "attached to another seat means"? I had this problem suddenly. Could it be that ubuntu thinks my drive is in a different "seat"? – Sanjay Manohar Aug 13 '15 at 13:40
  • 2
    When the dialog (for password) is shown, see at "details". It should show something like: "org.freedesktop.udisks2.filesystem-mount". That is the rule you need to change. I had "yes" in "allow_active", so I set "yes" also in the other two (allow_any and allow_inactive). Now the dialog is not shown. BTW, I checked the udisk documentation and found no interface for those options. I agree... there must be one. – lepe Dec 25 '15 at 3:25
  • 1
    I'm almost sure, that you could add such rule in /etc/polkit-1/... (see this link: forum.kde.org/viewtopic.php?f=22&t=112092) – lepe Dec 25 '15 at 3:28
1

I had the same problem today; "all of a sudden" my 14.04 wanted my password for "everything"; including (un)mount of USB sticks.

I figured that I installed openssh-server in the morning. After removing it, everything is back to normal; I can insert a USB stick; and it is mounted without asking for a password. Strange. Just tried to repro; installed openssh-server again; and no ... no such effect this time.

0

I also faced this problem two times. Asking for password not only during mount-umnount usb but also during other task like launching any application. I solved it by restarting system. It always worked for me.

0

I had the same problem with mounting on one of my systems. I tried using @Mitch approach above which didn't work for me (Although it may work great if you have the unmounting issue) . I took a similar approach to begin with and

sudo gedit /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy

but changed this section

<defaults>
      <allow_any>auth_admin</allow_any>
      <allow_inactive>auth_admin</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>

of

<action id="org.freedesktop.udisks2.filesystem-mount">

to

 <defaults>
      <allow_any>no</allow_any>
      <allow_inactive>no</allow_inactive>
      <allow_active>yes</allow_active>
    </defaults>

matching content found in the old

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

Sources: @Mitch answer above

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

     https://forum.kde.org/viewtopic.php?f=22&t=112092

Testing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.