Load kde profile from /mnt/removable/user instead of /home/user
here is what i want to do:
rather than my user profile being stored and loaded from /home/user, i want my user profile to be stored on my usb flash drive (1gb) which automatically mounts itself as /mnt/removable.
why i want to do this:
well in theory, if my profile is loaded to my usb flash drive which now makes it portable, i can now have a "roaming" profile sort of speak... so that any computer i go to with KDE and my user login script which points to the usb flash drive for my user profile, i can login anywhere with my user profile like as if i was on a domian network. not only that, but it would seem to be more secure cause all my user info is stored on this flash drive that i keep on me.
actions i have taken:
at first i figured how hard could this be... so to be safe i created a test user "joe" and edited the user profile in /etc/passwd from being "/home/joe" to "/mnt/removable/joe". i logged out of "jim", and logged in as "joe". well right off the start kde failed to load with the following errors:
-interprocess communication failed
-check that the "dcopserver" program is running!
-no write access to $home directory
from here it kicked me back to the kde login screen. so logged into "jim" and check the permissions of /mnt/removable and turns out it was running as jim jim. so i unplugged the flash drive, logged out of "jim" and at the kde login screen plugged in the flash drive, remotely logged in and checked the ownership of the drive... this time it was root root. so i tried logging in again as "joe" same errors.
next i changed the login of "joe" in /etc/passwd from /mnt/removable/joe to /home/joe, logged in as "joe", then logged out. i logged in again as "jim" and su to root and tried moving /home/joe to /mnt/removable. however there was errors in transfering the files to the flash drive. so thinking if root can't move the files then something isn't right here.
after this, i begun my endless search on the net for something like this... cause i can't be the only one who thinks it would be cool to store his user profile on a usb flash drive and have a kinda roaming profile that he can log in with at home or work??? but to my surprise nothing... there was backing up to a flash drive, how to mount a flash drive etc... nothing that i found related...
so my last attempt now is to place an SOS and see what comes to me...
so first off is this even possible???
if so... what am i missing in kde to allow for it to point to this drive and be able to write to it as a different user???
is there something in /bin/bash that i need to add???
just a note... i am not trying to backup my profile like documents or desktop, i can do that from kde's control center, i want to LOAD my complete profile from my usb flash drive, .kde and all...
some specs... i am using mandriva 2006 with the kde 3.4.2. ummm hardware wise although i don't think its the problem, is a laptop with a P4 3.o ghz chip, w/ 512 ram and ati9600 vid card... oh yeah, the usb flash drive is a sandisk micro cruzer 1gb.
thanks for your time in this and any comments are greatly appreciated. if this has already been addressed, then sorry for wasting your time and could you send me the link(s) that will point me in the correct direction. Jim!
You'll need your flash drive formatted with a *nix file system, like ext2/3. Then you can really set the permissions, create named pipes, sockets, etc.
alright what i got so far from the last post:
I formatted the usb flash drive by doing the following:
1)first i formated the flash drive as ext3 by using the following as root:
#mkfs -t ext3 -c /dev/sda1
//mkfs(make file system) -t(select what file system you will use, in my case ext3) -c(checks the drive for bad sectors) /dev/sda1(the location of the usb flash drive device)
2)next i mounted the flash drive using the following as root:
#mount -t ext3 /dev/sda1 /mnt/removable
//mount(mount device command) -t(select what file system to mount as, in my case ext3) /dev/sda1(location of the usb flash drive device) /mnt/removable(location of where you want this device to be mounted as)
3)i checked /etc/fstab to make sure it was mounted and sure enough it was.
4)i then gave the mount full user access by doing the following as root:
#chmod 777 /mnt/removable
5)i configured user "joe" to have his login point to /mnt/removable
6)logged out, logged in as "joe" and it worked... i was able to login as "joe", desktop came up and it worked just fine. i made some changes... logged out, logged in, and they stayed.
now for my problems:
1)is there a way to mount the usb flash drive on boot up? it seems to only mount itself once i login as a regular user on the computer... after i login say with "jim" and logout and login as "joe" with the usb flash drive, then the user can login normally... if i don't, then i get the error "kde failed to load"(which is good in the respect that i don't want peeps to be able to login without the usb key with their profile)
2)is there a way to automatically mount the usb flash when you are at the login screen? another test i did was to start up the pc without the usb flash drive, then when it was at the login screen, insert the key and login... well it didn't mount the usb flash, until i logged in with a profile on the hd first. also, if i login as a user on the hd, log out, then insert the usb key, and try to login as "joe" same problem occurs.
3)can i also partition the usb flash to have vfat partition and an ext3 partition? i would also like to store some files on the usb flash so that i can go to a winblows pc and transfer docs from one pc to another. would it be better if i left it as a vfat file system(or another file system that both winblows and linux can read and write to), that way i can still access all of my user docs through winblows rather than having a partition to transfer between them???
thank you again for your time in this matter... i am currently writing up a tutorial for creating roaming profiles using usb keys. I am also going home tonight and going to setup my linux box there and test out logging in with a profile from my usb key... i'll let you know of my results... Jim!
k, doing some more searching i came across this article which helped me solve the partitioning...
usb flash memory how to
i have also been reading that by editiing /etc/fstab, that on boot up it should recoginize my device??? i will explore and test some more, and i will post my fstab if i can not resolve what is going on...
if any one has any further thoughts, please let me know... thanks. Jim!
|All times are GMT -5. The time now is 12:04 AM.|