To rename a user
If you get the following error
- At the start screen press
Ctrl+ALT+F1
. - Log in using your username and password.
- Set a password for the "root" account.
sudo passwd root
- Log out.
exit
- Log in using the "root" account and the password you have previously set.
- Change the username and the home folder to the new name that you want.
usermod -l
-d /home/ -m - Change the group name to the new name that you want.
groupmod -n
- Lock the "root" account.
passwd -l root
- If you were using ecryptfs (encrypted home directory). Mount your encrypted directory using
ecryptfs-recover-private
and edit
to reflect your new home directory./.ecryptfs/Private.mnt - Log out.
exit
- press
Ctrl+ALT+F7
.
If you get the following error
usermod: can't change /etc/password
run the following commands i
n the root recovery consolemount -o remount,rw /
Then Rerun the usermod command
No comments:
Post a Comment