[CLUE-Tech] User Mount of Encrypted Volumes vi Loopback

Joe 'Zonker' Brockmeier jzb at dissociatedpress.net
Tue Nov 25 20:48:27 MST 2003


On Tue, 25 Nov 2003 15:44:33 -0700
"Jed S. Baer" <thag at frii.com> wrote:

*snip*

> One other thing though, is that in order to create an ext2 (or 3 for that
> matter) filesystem, you have to use the losetup command (unlike mkisofs).
> And it isn't by default setuid. So what it comes down to is that there
> isn't any way, AFAICT, for a non-root user to create/manage their own
> little encrypted virtual disk. Or, at least not using anything I can find.
> At two points, you need root access: 1) losetup, 2) editing /etc/fstab.

Actually, you can create a Ext2/Ext3 filesystem in a file as a user -- I've done
it quite a bit when creating filesystems for use with UML:

Step 1: Create an empty file using dd: dd if=/dev/zero of=my_fs bs=1M
count=1024

Step 2: run mke2fs on the empty file: /sbin/mke2fs my_fs

mke2fs will complain about the file not being a block device, but you can ignore
that... 

Now, I know UML can mount this as a valid filesystem without needing to run UML
as root, though in this case UML is simply a user process accessing a user's
file. The question is how to be able to mount it to the regular filesystem
without needing to be root... 

Is sudo an option?

Zonker
-- 
Joe 'Zonker' Brockmeier -=- jzb at dissociatedpress.net
http://www.DissociatedPress.net/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Computers are like Old Testament gods; lots of rules and no 
mercy." -- Joseph Campbell



More information about the clue-tech mailing list