Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
2  
You might get a better/quicker answer over on askubuntu.com –  ChrisF Oct 14 '10 at 10:12
    
There is a solution at askubuntu.com/questions/16700/how-can-i-change-my-own-user-id –  feeela Oct 9 '12 at 18:31

2 Answers 2

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

 
discard

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.