How to require password to mount USB in Mint 18

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
HRJ21
Level 1
Level 1
Posts: 36
Joined: Fri Aug 28, 2015 4:12 am

How to require password to mount USB in Mint 18

Post by HRJ21 » Fri Oct 21, 2016 4:59 am

Hello, call me paranoid but I like to asked for my password before external drives are mounted to my system. This used to work fine in Mint 17.3, using the answer here: http://askubuntu.com/questions/389974/h ... usb-drives and creating /etc/polkit-1/localauthority/90-mandatory.d/external_mnt.pkla containing:

[external mount pass]
Identity=unix-group:admin;unix-group:sudo
Action=org.freedesktop.udisks.filesystem-mount
ResultActive=auth_admin_keep

I recently upgraded to Mint 18, and now this no longer seems to work. I have this file, but USB drives are still mountable without prompting for my password. I'm sure this is something silly I'm forgetting to do, but any advice would be appreciated. Thanks!

altair4
Level 19
Level 19
Posts: 9392
Joined: Tue Feb 03, 2009 10:27 am

Re: How to require password to mount USB in Mint 18

Post by altair4 » Fri Oct 21, 2016 7:58 am

I'll be honest with you this is just a flat out guess.

If I run a command that lists all "filesystem-mount" actions:

Code: Select all

pkactions | grep filesystem-mount
This is what I get in Mint18:
org.freedesktop.udisks2.filesystem-mount
This is what I get in Mint17.3:
org.freedesktop.udisks.filesystem-mount
org.freedesktop.udisks2.filesystem-mount
udisks2 replaced udisks some time ago. I suspect in Ubuntu 16.04 they decided to remove the udisks actions completely.

Change your pkla file:
[external mount pass]
Identity=unix-group:admin;unix-group:sudo
Action=org.freedesktop.udisks2.filesystem-mount
ResultActive=auth_admin_keep
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

FreedomTruth
Level 4
Level 4
Posts: 422
Joined: Fri Sep 23, 2016 10:19 am

Re: How to require password to mount USB in Mint 18

Post by FreedomTruth » Fri Oct 21, 2016 10:44 am

altair4 wrote:I'll be honest with you this is just a flat out guess.
Action=org.freedesktop.udisks2.filesystem-mount
Good guess! That works for me on 18, I just hope it works for HRJ21 also.
If you abide in My word, you are My disciples indeed. And you shall know the truth, and the truth shall make you free... Most assuredly, I say to you, whoever commits sin is a slave of sin... Therefore if the Son makes you free, you shall be free indeed.

HRJ21
Level 1
Level 1
Posts: 36
Joined: Fri Aug 28, 2015 4:12 am

Re: How to require password to mount USB in Mint 18

Post by HRJ21 » Fri Oct 21, 2016 11:34 am

Wow! Thank you! Who knew I was so close and yet so far ;) I feel like this is the kind of thing that should be made available in the cinnamon-settings gui, and should even be enabled by default. Have people not watched Mr. Robot?!

Post Reply

Return to “Newbie Questions”