6

I don't want anyone to be able to copy my files anyhow.

Is it possible to make Ubuntu ask for my password before mounting USB drives? If it is, how can I do it?

ayotomson
  • 63
  • 6

2 Answers2

2

You could try encrypting your usb drive on filesystem level. Take a look at Ubuntu Community Help Wiki EncryptedFilesystemHowto. It explains in a quite detailed way the steps you have to take plus it has some examples.

msw
  • 4,678
hmayag
  • 2,246
  • 5
  • 21
  • 23
0

To ask password when you also mount USB drives,

  1. Open Terminal (Shortcut = Ctrl+Alt+T).

  2. Type

    sudo gedit /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
    
  3. Add org.freedesktop.udisks2.filesystem-*; to Line 3.

  4. Change line 4, ResultActive=yes to ResultActive=auth_admin.

  5. After edits Lines 1 -4 will look like :

    [Mounting, checking, etc. of internal drives]
    Identity=unix-group:admin;unix-group:sudo
    Action=org.freedesktop.udisks.filesystem-*;org.freedesktop.udisks.drive-ata-smart*;org.freedesktop.udisks2.filesystem-mount-system;org.freedesktop.udisks2.encrypted-unlock-system;org.freedesktop.udisks2.filesystem-fstab;org.freedesktop.udisks2.filesystem-*;
    ResultActive=auth_admin
    
  6. Save and Close file.

Now Ubuntu will ask password each time before mounting usb-drives. Hope it helps.

This worked for me in Ubuntu 20.04.

anoopknr
  • 101