nomadstart.blogg.se

How to encrypt computer files for moving
How to encrypt computer files for moving




how to encrypt computer files for moving

rename this /home/paranoid directory to /home/paranoid_new sudo mv /home/paranoid /home/paranoid_new This will now create a new /home/paranoid directory on /homeĤ.

#How to encrypt computer files for moving install#

The above two steps backup the paranoid data so it is not clobered by the step 3Ĭreate a new user while logged in on new machine called paranoid with exactly the same password as paranoid has on the old install sudo adduser paranoid Rename the /home/.ecryptfs/paranoid to /home/.ecryptfs/paraonoid_old sudo mv /home/.ecryptfs/paranoid /home/.ecryptfs/paraonoid_old While logged on new instal as "admin" and with home mounted from the existing installs home partition rename the /home/paraniod folder to paranoid_old sudo mv /home/paranoid folder paranoid_old We need 4) so that the system can do the decryption of the file system files. We need 3) to be the case so the user has read and write privileges on the files in their home. We set up 2) so that the directory structure for the user is the same on the new install as it was on the old So the password on the new instal needs to be the same so it can decrypt the files. We need 1) to be the case because the files are encrypted in away that is unlocked by the users password. The files in both these directories are owned by the user paranoid.home/.ecryptfs/ paranoid/ and of /home/ paranoid/ the /home folder on the new install has a copy of.The new install has an identically named user with an identical password to the user on the old install.It would appear that all you need to do to migrate the user is to engineer a situation where: README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txtĪll the magic of an encrypted home actually happens in a folder named for the user in /home/.ecryptfs/Īll the users actual files are stored encrypted in Private -> /home/.ecryptfs/paranoid/.Private ecryptfs -> /home/.ecryptfs/paranoid/.ecryptfs

how to encrypt computer files for moving

It has the following:Īsktop -> /usr/share/ecryptfs-utils/sktop And there is /home/paranoid which is the home directory of the paranoid user on my old install. There is /home/admin which is the home directory of the admin user on my new instal. I go into detail about how I went through this process at the end in an appendix.īut the bottom line is I got my system to a point where I had an old instal and a new instal both sharing the same /home partition. My install has one of its users (lets call her "paranoid") with an encrypted home directory and I wanted to migrate this user so they could login on my new install. My scenario was that I was moving my install from one disk to another. I had to do a similar task recently and I found Dustin's answer very useful. Now, from the OLD machine, as root, rsync your /home directory from the OLD to the NEW machine: sudo rsync -aP /home/ NEW:/home/įinally, make absolutely sure that the files on the NEW machine are owned by YOURUSER: sudo chown -R /home/.ecryptfs/YOURUSER /home/YOURUSERĪnd that should do it! You should be able to login as normal to your NEW machine and read and write your data!įull disclosure: I'm the author and maintainer of Ubuntu's Encrypted Home Directory feature. Make absolutley sure that YOURUSER is NOT currently logged into either the NEW machine or the OLD machine.

how to encrypt computer files for moving

sudo passwdĪlso, on the NEW machine, create a new user, who's name and password precisely matches the name and password on the old machine. But I usually set a root password on the NEW machine. You could install your public SSH key in the root user's /root/.ssh/authorized_keys file. sudo apt-get install openssh-server ecryptfs-utils To do so, I use rsync to copy all of my /home partition/directory from the OLD machine to the NEW one.įirst, ensure that you have openssh-server and ecryptfs-utils installed and running on the NEW machine. Great question! I actually do this quite frequently (every few months).






How to encrypt computer files for moving