I just want to change the username of a user with an encrypted home directory. Is there a simple way instead of the suggested restoring and so forth?
Asked
Active
Viewed 657 times
1 Answers
5
- It's best to unmount your home directory and execute the commands from another administrator account on the computer. You could use
ecryptfs-umount-privateor just reboot to unmount the directory. Change the login name and directory name from
old_usertonew_user:sudo usermod -l new_user -m -d /home/new_user old_userHere comes the important part for the proper configuration:
- There exists a file named
/home/.ecryptfs/$USER/.ecryptfs/Private.mntit usually contains the following:/home/$USER The following symlinks exist in your home directory when eCryptfs is not mounted:
.ecryptfs -> /home/.ecryptfs/$USER/.ecryptfs .Private -> /home/.ecryptfs/$USER/.PrivateMake sure that
$USERin all these instances reflects the changes you intended to make, e.g.new_user. You can usenanoto edit text files andln -sto create new symlinks.
- There exists a file named
You should be able to login again. I just tried it on my own. If you cannot log in through the GUI try from the terminal and check again that everything is in place.
LiveWireBT
- 29,597