LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-18-2005, 01:10 AM   #1
Slagazor
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, 01: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, 08:29 AM   #3
Blinker_Fluid
Member
 
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, 12:44 PM   #4
Harmaa Kettu
Member
 
Registered: Apr 2005
Location: Finland
Posts: 196

Rep: Reputation: 30
Quote:
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, 04:37 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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


Cheers,
Tink
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing username/passwd in Thunderbird leupi Linux - Software 2 04-17-2005 10:35 AM
Changing LQ username? ksgill LQ Suggestions & Feedback 3 03-06-2005 03:44 PM
Changing Super User Username bjmurph Linux - General 7 10-11-2004 04:52 PM
Changing username Kramon Mandriva 1 11-24-2003 09:04 PM
changing username evil_lafta Slackware 3 01-15-2003 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:37 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration