LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 01-19-2014, 04:28 PM   #1
CurtisMills
LQ Newbie
 
Registered: Dec 2013
Posts: 4

Rep: Reputation: Disabled
change username and password


I have Linux Mint 16 on my computer. How do I change the username and password?
 
Old 01-19-2014, 05:28 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Changing the password is easy; just open up a command prompt while logged in and type the "passwd" command (no quotes). You will be prompted for the current password and then given an opportunity to change it.

Changing the user name is somewhat hardwaer. You have to find the correct entry in /etc/passwd and /etc/shadow and change the name there. You also need to edit /etc/group and change all references from the old name to the new name. Note: if you mess this up, you will probably lock yourself out of the system, so before you do this, it's a good idea to create and "rescue" account that su or sudo to root in case something goes wrong. Also, I'd recommend making back-up copies of /etc/passwd, /etc/shadow, and /etc/group.
 
Old 01-19-2014, 06:21 PM   #3
GVrooman
Member
 
Registered: May 2008
Distribution: Slackware
Posts: 45

Rep: Reputation: 11
Why not just create a new user account with a new password? Then when you are logged on under the new account you can delete the old one. Or maybe I am missing something here.
 
Old 01-19-2014, 06:37 PM   #4
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 647

Rep: Reputation: 52
A little Googling shows changing the username should work just the same as the password change:

http://www.ehow.com/how_8143052_chan...x-account.html

Given Mint is pretty newbie friendly, I have to imagine the settings manager also has a way to do this (well, the XFCE version doesn't- but maybe GNOME/KDE do).
 
Old 01-19-2014, 06:54 PM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,876
Blog Entries: 1

Rep: Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997
Quote:
Originally Posted by shane25119 View Post
A little Googling shows changing the username should work just the same as the password change:

http://www.ehow.com/how_8143052_chan...x-account.html

Given Mint is pretty newbie friendly, I have to imagine the settings manager also has a way to do this (well, the XFCE version doesn't- but maybe GNOME/KDE do).
See man usermod...

Quote:
-l login_name
The name of the user will be changed from login to login_name.
Nothing else is changed. In particular, the user's home directory name
should probably be changed to reflect the new login name.
In general, there are quite a few additional things that should/must be changed when a user name is changed, including any groups, file paths, keys, etc. derived from the original name and anything that references the name instead of the UID.

It depends somewhat on how active the original user has been and how long the account has existed - the longer and more active, the more likely unexpected things will break downstream.
 
  


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
How to username password and sort by weakest password rhbegin Programming 8 11-07-2012 09:39 AM
change mysql username and password on ec2 lamp ggalan Linux - Newbie 4 04-04-2012 08:43 PM
Two password for same username prakasarul Linux - Security 3 01-25-2012 08:20 AM
How to change username and password in Squint joms18 Linux - Newbie 1 01-28-2010 02:12 AM
Get/Change the username & password in a CUSTOM Ubuntu LiveCD tuxhats Ubuntu 0 10-18-2007 10:32 PM


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