Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
How do I change my username?

Recently i've added new accounts in my PC, and for one of those need to change name: I've try to change it by "graphical procedure" from "account manager menu" but change only the name in LogIn screen and near the clock. If I open a Terminal the name remain the old one.

I need to have this situation from Old name: franco@PC-Casa:~$ -----> I want obtain New name: francesco@PC-Casa:~$ o

How i can do this without create a new one user and transfer all data? Can you explain me step by step the procedure?

share|improve this question

marked as duplicate by fossfreedom Oct 24 '12 at 7:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

up vote 1 down vote accepted

User-accounts are controlled from the file /etc/passwd and groups from /etc/group

When a user is created in Ubuntu a group is created aswell, so you need to edit both of those files (as root).

Edit the username and also the home folder for the required user and also edit the group-name in /etc/group.

Then you should get the name changed "for real".

Edit: And of course don't forget to change the name of the home-directory.

share|improve this answer
Thanks very much for your help! – Giorgio Oct 28 '12 at 19:30

This seems like what you're looking for. Click here for tutorial

Personally I would skip the reboot step and just log out and at loggin screen hit Ctrl+Alt+F1 and login as root. And then do the steps after where the tutorial says "Reboot". Notice if for some reason you're already logged in, in the terminal as "your user name". Type logout to logout. And then loggin as root.

Addition: In Case you're using encrypted home directory, scroll down and read the comments as well.

share|improve this answer
Thanks very much for your help! – Giorgio Oct 28 '12 at 19:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.