pmount: mounting any devices as a normal user
There are tools which are such a revelation, they change your life. It's certainly the case of pmount which I now use everyday and still surprises me at times.
1 Basic Usage
Forget about automounters, /etc/fstab
and GVfs. Where you would normally use mount, you can now use pmount to mount your filesystems. Plug in a device and just type for instance:
pmount sdb1
... as a perfectly normal user to mount it into a mount point which will be automatically created for you under the /media/
directory. Likewise, run pumount /media/sdb1
to unmount it, which will remove the mount point automatically.
It's such a useful tool that I'm just surprised that it's not yet installed by default on more modern Linux distributions.
2 Encrypted Filesystems
More recently, I was astonished when I accidentally plugged in a UBS stick whose filesystem had been encrypted with cryptsetup and LUKS and ran pmount
that it actually asked me for a passphrase and that, provided with the correct one, it actually unencrypted and mounted the filesystem. The lengthy procedure involving using the cryptsetup
and mount
commands is completely taken care of by pmount.
3 Mounting Loop Devices?
This doesn't appear to be supported the regular way, on the other hand. It's not advertised in man pmount
and trying to force any -o loop
option to it just won't do. However, man pmount.conf
does describe various configuration items to enable it, even if it is strongly discouraged for security reasons. It doesn't go into details as to how this is done in practice, either.