Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it possible to create a portable User Account in Ubuntu? What do I mean by portable? Well, lets say I have a usb drive. On the usb drive I have a typical home folder (unencrypted) with all the config stuff and personal file, pic, music, etc. I plug it in and it mounts. Is it possible to get the dm to see this? I'm making the assumption this user account was created with the Live distro avoiding any potential compatibility issues.

share|improve this question
    
You want a user account to only exist when the drive is plugged in? –  Karlson Feb 3 '12 at 18:57
    
I'm not sure about automounting, but you'd definitely have to use an appropriate filesystem, such as ext2/3/4. If you use a filesystem such as FAT32 or NTFS, you'll get some permissions issues, as those filesystems don't support Unix-style permissions and certain files in a home directory have specific permissions requirements. –  Scott Severance Feb 3 '12 at 19:02
add comment

1 Answer 1

up vote 2 down vote accepted

Yes, just use persistence.

Make a file in the root directory of any partition or your flash drive (after making a live flash drive from the iso)

# this will make a 1 Gb file for storage, increase / decrease the count as needed
dd if=/dev/zero of=./home-rw bs=1M count=1000

Make a file system on the file

mkfs.ext4 home-rw

mke2fs 1.41.14 (22-Dec-2010)

home-rw is not a block special device.

# Answer ‘yes’ here

Proceed anyway? (y,n) y

Remove the reserved blocks

tune2fs -m 0 -L home-rw home-rw

Then when you boot the USB (or CD) , use the persistence option (you have to manually edit the boot line)

You can use this method with USB or CD.

See - Ubuntu Wiki Persistence for details

Loop mount

You can loop mount the file with any distro

sudo mount -o loop /dev/sdb1/home-rw /mnt

Adjust the mount point as needed (/home , /home/User_name/data , up to you).

When it is loop mounted you can access the data.

share|improve this answer
    
But, is it possible to sign in after boot? The reason I ask is that the users data will be encrypted using a different encryption method. So, it must be decrypted in the live environment first, then signed into. I'm using TrueCrypt whci allows several keys, which means super hard levels of AES vs. a password. –  bambuntu Feb 3 '12 at 20:25
    
I've not done it, you would need to configure the live CD to use ecryptfs. Personally, with what you are wanting, I would just encrypt the data and not all of $HOME. –  bodhi.zazen Feb 3 '12 at 20:40
    
Why do you suggest a live flash drive? Why do you suggest dd? Why do you talk about booting from the USB? –  user unknown Feb 3 '12 at 20:43
    
No, my question was, why he should make a live flash drive. He only want's to mount his home directory, if I understand correctly, which shall be mounted from the USB-drive, but the USB-drive needn't be a bootable device. The live system is just used to create a fresh, compatible home folder, afaik. –  user unknown Feb 3 '12 at 21:07
1  
After taking everything you guys mentioned into consideration, I don't think a persistent home drive will serve my interests. I'm using a remastered dvd that has all my customizations, so I guess I really don't need the home drive. I was just thinking it would nice sign into a home directory with all your stuff (I can't save to the home folders on live dvd). It's better to just remaster the dvd for theme customizations and just use TrueCrypt on a usb stick for data storage. –  bambuntu Feb 3 '12 at 21:20
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.