Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-18-2005, 12:10 AM   #1
LQ Newbie
Registered: May 2002
Location: salt lake
Distribution: Red Hat
Posts: 24

Rep: Reputation: 15
changing username

How insanely hard is it to rename a user?

I don't mean just creating a new user with the "right" name, but actually changing the username.
Old 04-18-2005, 12:46 AM   #2
Simon Bridge
LQ Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Red Hat (which one) has a user manager which you can access as root.
Old 04-18-2005, 07:29 AM   #3
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
vi /etc/passwd
Make change to user name
You probably will need to rename the /home/username to match it if you change the home dir also in /etc/passwd.

Files are tied to the UID number not name so they should still be owned by the user.
Old 04-18-2005, 11:44 AM   #4
Harmaa Kettu
Registered: Apr 2005
Location: Finland
Posts: 196

Rep: Reputation: 30
vi /etc/passwd
Make change to user name
/etc/shadow too.

Be very careful when editing those files. One little typo there can disable all user accounts, including root.
Old 04-18-2005, 03:37 PM   #5
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
And maybe a
mv /home/<oldname> /home/<newname>
, too, just for consistencies sake ;)



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
Changing username/passwd in Thunderbird leupi Linux - Software 2 04-17-2005 09:35 AM
Changing LQ username? ksgill LQ Suggestions & Feedback 3 03-06-2005 02:44 PM
Changing Super User Username bjmurph Linux - General 7 10-11-2004 03:52 PM
Changing username Kramon Mandriva 1 11-24-2003 08:04 PM
changing username evil_lafta Slackware 3 01-15-2003 09:22 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:19 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