LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 11-01-2007, 09:18 PM   #1
TerranML007
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.

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

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

Rep: Reputation: 15
Quote:
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.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 12:15 AM.

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