I don't think I would try changing a username... I would just add a new user and copy everything over to the new account.
$ sudo useradd new-name
$ sudo passwd new-name
Logout of the old account, and in with the new one.
$ sudo cp -R /home/old-name /home/new-name
$ sudo chown -R new-name.new-name /home/new-name
Those two commands will copy everything over from the old account to the new account, then set the ownership on all the files to the new account.
Hmmm... I don't know if the new account will automatically be added to the sudo list. You might have to edit /etc/sudoers to add the new account.
Once you've determined everything is working fine, you can delete the old account with userdel, and free up the hard-drive space by deleting the old account's home dir.
|