The Blog of Justin Loutsch

I don't know the question, but the answer is 42!

About

I'm Justin, and I live in Boston. I'm a huge geek into process automation and work reduction, and am also an editor at Eat Your Serial. Thanks for dropping by!

This was done in CentOS 6.4 but PolicyKit is part of gnome so it should work across different distriubtions.

I’ve run into this problem before, but it finally today became something I needed to solve after I moved the server to a new office with no monitor or inputs.

I would VNC in but the external drives could not be mounted due to gnome policykit controls (for security’s sake).

So, here’s how to enable disk mounting in a VNC session in policykit.

CD into /etc/polkit-1/localauthority and you’ll find a bunch of files:

net.reactivated.fprint.device.policy org.fedoraproject.config.firewall.policy
org.fedoraproject.config.services.policy
org.fedoraproject.systemconfig.kdump.policy
org.freedesktop.NetworkManager.policy
org.freedesktop.RealtimeKit1.policy
org.freedesktop.consolekit.policy
org.freedesktop.devicekit.power.policy
org.freedesktop.devicekit.power.qos.policy
org.freedesktop.modem-manager.policy
org.freedesktop.network-manager-settings.system.policy
org.freedesktop.packagekit.policy
org.freedesktop.policykit.policy
org.freedesktop.udisks.policy
org.gnome.clockapplet.mechanism.policy
org.gnome.control-center.defaultbackground.policy
org.gnome.cpufreqselector.policy
org.gnome.gconf.defaults.policy
org.gnome.settings-daemon.plugins.wacom.policy
org.gnome.system-monitor.policy
org.opensuse.cupspkhelper.mechanism.policy

The one we’ll want to edit is org.freedesktop.udisks.policy.

First, backup this file:

sudo cp /usr/share/polkit-1/actions/org.freedesktop.udisks.policy /usr/share/polkit-1/actions/org.freedesktop.udisks.policy.bak (or any other location you prefer).

In the terminal, run the following command: vi /usr/share/polkit-1/actions/org.freedesktop.udisks.policy

Look for this section:

<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>yes</allow_any>
      <allow_inactive>yes</allow_inactive>
      <allow_active>yes</allow_active>
</defaults>
</action>

Change the fields in red so that all say “yes” instead of no.

Save the file (in vi, this is down by hitting the escape key, then typing a colon, W, Q!, and will look like this: :wq!). Restart the VNC session. You should now be able to mount your external drives in a VNC session.

One Response to “Enable disk mounting access in a VNC session”

  1. Can I Take Xanax With Oxycontin Xanax Method Of Employment Xanax Drug Use Side Effects buy alprazolam without prescription. Xanax At Night Prescription Valium Visual Studio Xanax Apple Xanax Milligrams Xanax And Delusions . Popping Xanax Around Xanax Mayonnaise . Cheap Xanax Health Blue Xanax 2mg Xanax In Australia Anxiety Disorder Rebound Xanax Generalized Anxiety Taking Suboxone And Xanax Just Xanax Xr And Alcohol Both

    dertpr