Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 11-01-2007, 09:18 PM   #1
LQ Newbie
Registered: Nov 2003
Distribution: Knoppix-STD, may think of trying others
Posts: 3

Rep: Reputation: 0
Change username

A friend of mine just recently installed Ubuntu 7.10 and wants to change his username; both of us are pretty new to Linux so we have pretty much no idea.

I glanced through the tutorials quickly (didn't have much time because we were in class) and didn't see anything, so I'm hoping someone can help us out.

Old 11-01-2007, 09:38 PM   #2
Senior Member
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
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 /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.
Old 11-01-2007, 11:15 PM   #3
Registered: Mar 2007
Location: Nebraska
Distribution: CentOS
Posts: 82

Rep: Reputation: 15
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.
You could also edit /etc/group and add the new user to the admin group. This is the group that has sudo abilities of root in Ubuntu.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
can i change username bobber Debian 2 01-19-2006 02:34 AM
username change...... roshu Linux - Software 2 03-10-2005 03:31 AM
Change the username rahul_kulkarni Linux - Newbie 3 12-23-2004 11:18 AM
Change username? theonebeyond LQ Suggestions & Feedback 3 12-05-2004 12:32 PM
username change nakkaya Linux - General 3 02-28-2003 02:10 PM > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:48 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration