Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using ubuntu 10.10. I wish to change my user id.

How can I change it without opening another account?

I tried using System->Administration->Users and Groups but I got a message saying the user is logged in (which is true, that's me!).

Also tried using the shell:

dave@mypc:~$ sudo usermod -u 875 dave
[sudo] password for dave: 
usermod: user dave is currently logged in

So what can I do?

share|improve this question
You might get a better/quicker answer over on – ChrisF Oct 14 '10 at 10:12
There is a solution at – feeela Oct 9 '12 at 18:31
up vote 8 down vote accepted

You need to log with a different account in order to change the dave account.

Either log in as another (temprarily created for this purpose) user and use sudo as you tried in your question, or log in as root at a text console (CTRL-ALT-F1 etc).

Before you can log in directly as root, you will have to enable it by setting a password (use the command sudo passwd root. To re-disable the root login afterwards log in as yourself and use the command sudo usermod -p '!' root).

share|improve this answer

Log out, switch to a text console, log in as root, and then run usermod to change the UID, and then run find to find all files owned by the old UID and change them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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