Wiki Table of Contents

Mount internal partition without using root password

By default, the gvfs/udisks2 stack requires a root/superuser password when mounting internal partitions.  Setting the “user” option in your /etc/fstab file will not change this behavior in the gui (by default, Thunar) file managers that utilize gvfs and/or udisks2.

Authentication for udisks2 is handled with policy kit.  If you wish to override the default behavior of requiring a root/superuser password, then paste the contents below into a file called /etc/polkit-1/localauthority/50-local.d/50-udisks.pkla to allow any user in the “users” group to mount partitions without a root/superuser password.  Changes should take place immediately.  Note that this will NOT override the filesystem permissions.  

—–

Content of new file /etc/polkit-1/localauthority/50-local.d/50-udisks.pkla

Code:

[udisks]
Identity=unix-group:users
Action=org.freedesktop.udisks*
ResultAny=yes
ResultInactive=no
ResultActive=yes

5 thoughts on “Mount internal partition without using root password”

  1. This code does not work. You have to replace simple brackets () with square ones [], like:

    [udisks]
    Identity=unix-group:users
    Action=org.freedesktop.udisks*
    ResultAny=yes
    ResultInactive=no
    ResultActive=yes

    Reply
  2. Thank you! Those brackets got changed on the webiste during our migration from drupal to wordpress. fixed now.

    btw, this action can be done automatically in mx-tweak.

    Reply
      • it does, but we added a simple switch in MX-tweak for it. (I use systemd exclusively on my installed system these days)

        the feature does not rely on systemd or sysVinit in any way, but it does rely on policykit and an policykit authenticator should be running. this is automatic on Xfce and MX, but is not automatic on some window manager setups.

        Reply
  3. Thank you very much!
    I am new to MX Linux, I have many partitions and was annoying to put root password every time I was mounting a partition.

    Reply

Leave a Comment

Do NOT follow this link or you will be banned from the site!