Results 1 to 10 of 10

Thread: Require sudo password on partition mount

  1. #1
    Join Date
    Apr 2010
    Location
    England
    Beans
    3,286

    Require sudo password on partition mount

    It appears that Lucid has done away with the gksu prompt that used to greet you when you try to mount a partition. Is there any known way of restoring this? I have a number of partitions which I would rather have protected by a password (even though I know that booting a live cd will give anyone access to any mountable partition, no questions asked). I've had a quick look in gconf and found nothing that looks like it would control this behaviour, but it's quite likely that I overlooked something. Does anybody have any ideas?

  2. #2
    Join Date
    Apr 2010
    Beans
    11

    Re: Require sudo password on partition mount

    Get Mount manager through synaptic. Run from system-admin-mount manager.

    Select the drive on the left side, edit permissions from administrator to everyone in the right side panel.

    Hope this helps, I had the same problem as you this morning and this worked for me.

  3. #3
    Join Date
    Apr 2010
    Location
    England
    Beans
    3,286

    Re: Require sudo password on partition mount

    Thank you for the reply, but that seems to be the inverse of what I am trying to achieve. I want to be prompted for my sudo user password when I try to mount a partition, currently it just mounts the drive without the prompt.

  4. #4
    Join Date
    Jun 2007
    Beans
    17,337

    Re: Require sudo password on partition mount

    In a terminal go
    Code:
    gksu gedit /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
    For the first listed override change the ResultActive=yes to

    ResultActive=auth_admin_keep

    Or if you want to 'deactivate' all three included overrides then simply

    Code:
    sudo mv /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla.bak
    First option is probably the best

  5. #5
    Join Date
    Apr 2010
    Location
    England
    Beans
    3,286

    Re: Require sudo password on partition mount

    Excellent, that's exactly what I was looking for. Thank you.

  6. #6
    Join Date
    Sep 2006
    Location
    Allentown, PA; USA
    Beans
    519
    Distro
    Ubuntu Budgie

    Re: Require sudo password on partition mount

    I want to do the opposite. I am the only user of my laptop and I want my data partition to be mounted and unmounted at will without a password prompt. Since Lucid does not have the "Policykit-Authorization" gui from SystemSettings (kde), I cannot pull this off now. I tried editing the above file and changed "admin" to my username but that made no difference.

    I could just add it to fstab, but I should not have to. I feel Lucid KDE removed some decent user functionality by removing the "frontend" to policykit.

    Is there a way to accomplish the bypassing of the password prompt?

  7. #7
    Join Date
    Jan 2010
    Location
    No longer SoFl
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Require sudo password on partition mount

    Quote Originally Posted by mc4man View Post
    In a terminal go <SNIP>
    Thank you, This helped me as well.

  8. #8
    Join Date
    Jan 2010
    Location
    No longer SoFl
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Require sudo password on partition mount

    I finally got around to installing 10.4 on my desktop and applied this. However I now need to use a password when I use a USB drive.
    Is there anyway to require a password for a certain (Windows) partition but not for USB/external drives?

  9. #9
    Join Date
    Aug 2010
    Beans
    2

    Re: Require sudo password on partition mount

    @mc4man: RESPECT

    I added an entry for the partitions i do not want in /etc/fstab and the symbols in nautilus disappeared imediatly when i saved fstab.

    But the entries with the option users disappear too.

    I hope the ability for normal users to mount the fstab entries also disappears.

  10. #10
    Join Date
    Nov 2009
    Beans
    76

    Unhappy Re: Require sudo password on partition mount

    help. this is not working in ubuntu studio 10.04....

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •