- Log in using your username and password (username to be changed)
- Set a password for the root. Following will prompt for the new password.
sudo passwd root
- Log out.exit
- Log in using the root account. Give the new password.
- If the user account of which the username is to be changed is still in use log out from that.
pkill -KILL -u username - Change the username and the home folder to the new user name.
usermod -l
-d /home/ -m - Change the group name to the new group name that you want.
groupmod -n
- Can check the group names using this.
groups - Better lock the root account.
- Log out from root and log in using the new username
- Done!
Changing the username in Ubuntu/ Linux
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment