LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 09-27-2008, 03:35 PM   #1
MBA Whore
Member
 
Registered: May 2006
Location: Kansas City, MO
Distribution: Various: pclos, Debian, Ubuntu, etc . . .
Posts: 649

Rep: Reputation: 30
How to change my user account names


Hello,

I have MEPIS 7.0 and 2 accounts (a guest account and my standard user account). I want to change the names I gave to these 2 accounts. Is there a way I can do so, or must I create new accounts with the names I like then copy / paste my data from the old accounts to the new accounts.

I can login as superuser and change passwords, but I don't know if it is possible to change the account name.

Thanks.
 
Old 09-27-2008, 03:45 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
You can change a user name with the -l option of the usermod command. You may also want to rename the user directory in /home and you may also want to change to owner of the user directory and all of its subdirectories and files using the chown command.

----------------------
Steve Stites
 
Old 09-28-2008, 07:42 PM   #3
racracracrac
Member
 
Registered: Sep 2008
Posts: 44

Rep: Reputation: 15
If you use the usermod command recommended above, you would need to chown anything because the the uid hasn't changed.

If you do it by hand by editing the passwd file, you can find the files you need to chmod and chmod them with the following command.

sudo find / -uid XXX | while read filename ;do chmod USER "$filename" ; done

Replace XXX with the old uid # and USER with the new username. There are fancy shell ways of avoiding the while;read, but this works very well and works in virtually any shell. You can score points if you tell me what I am doing it this way.

(link removed)

Last edited by Mara; 10-12-2008 at 04:00 PM. Reason: link removed, as it has nothing to do with this thread
 
  


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
Change User Name / Delete Account gacl LQ Suggestions & Feedback 24 09-17-2017 02:16 PM
Change_passwd plugin for SquirrelMail does not change user account password kaplan71 Linux - Software 0 04-18-2008 12:41 PM
Password Change in SquirrelMail did not propogate to user login account kaplan71 Linux - Software 0 03-28-2007 08:48 AM
Can unlock screen with root password in my user account - want to change this sm1 Linux - Newbie 2 07-24-2005 05:54 AM
Disable passwd change for user account sodhilogin Linux - General 6 09-01-2004 12:43 AM

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

All times are GMT -5. The time now is 12:28 PM.

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