Pages

Changing the username in Ubuntu/ Linux


  1. Log in using your username and password (username to be changed)
  2. Set a password for the root. Following will prompt for the new password.
    sudo passwd root
  3. Log out.exit
  4. Log in using the root account. Give the new password.
  5. If the user account of which the username is to be changed is still in use log out from that.
    pkill -KILL -u username
  6. Change the username and the home folder to the new user name.
    usermod -l -d /home/ -m
  7. Change the group name to the new group name that you want.
    groupmod -n
  8. Can check the group names using this.
    groups
  9. Better lock the root account.
  10. Log out from root and log in using the new username
  11. Done!

No comments:

Post a Comment