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?
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?
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.
To ask password when you also mount USB drives,
Open Terminal (Shortcut = Ctrl+Alt+T).
Type
sudo gedit /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
Add org.freedesktop.udisks2.filesystem-*;
to Line 3.
Change line 4, ResultActive=yes
to ResultActive=auth_admin
.
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
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.