Ask Your Question
0

Removing USB Drives without password

asked 2014-09-16 12:49:09 -0500

fat-lobyte gravatar image

Hi!

I have two USB drives (formatted as NTFS) that I use for backup and synchronization purposes. When plugged in, I wanted them to be mounted under a specific directory, preferably under /mnt/. The mounted should be done automatically under any user, like with any unknown USB stick.

That's why I opted for the following fstab entry:

UUID=4EBC5FB82435B0EE /mnt/4EBC5FB82435B0EE ntfs user,nosuid,nofail,gid=489,dmask=007,fmask=117,x-gvfs-show 0 0

This works fairly well: i can simply plug it in, it shows up in nautilus, I have read/write permissions and everything is fine.

However, when I try to unmount it (either with nautils, or the the unmount button in the notification area) I am required to enter my password, because supposedly it was mounted by another user, although it was clearly not.

Is there a way to make the drive unmountable by me (or by any user for that matter) without requiring the root password?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-09-16 15:44:47 -0500

vtrefny gravatar image

You need to use users option. user allow every user to mount the device but not to unmount it.

See man mount for more details:

user Allow an ordinary user to mount the filesystem. The name of the mounting user is written to mtab so that he can unmount the filesystem again. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).

users Allow every user to mount and unmount the filesystem. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line users,exec,dev,suid).

edit flag offensive delete link more

Comments

Unfortunately, this does not work: gnome is still asking for the password. Also, the mount option "users" does not come up when checking /etc/mtab.

fat-lobyte gravatar imagefat-lobyte ( 2014-09-25 10:44:17 -0500 )edit

Question Tools

Stats

Asked: 2014-09-16 12:49:09 -0500

Seen: 294 times

Last updated: Sep 16 '14