After changing password, cannot log in

5,154

To change password, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo passwd <User_Name>
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Note: <User_Name>, refers to the user that was created at the time of installing Ubuntu.

Share:
5,154

Related videos on Youtube

Troy Pruyt
Author by

Troy Pruyt

Updated on September 18, 2022

Comments

  • Troy Pruyt
    Troy Pruyt over 1 year

    I lost the password to my old laptop, and after reading, I found out how to change it using the text interface.

    I successfully changed my password to my root user, but now instead of telling me "Incorrect password" it just blinks the screen black and returns me to the login prompt with no message. I know the password is correct.

    I've seen many other questions with this problem, but nobody's solutions have helped so far. I've used the text interface to upgrade to the latest version. I've tried removing Xauthority, (it was not found).

    I can login to the root account just fine through the non-graphic interface of course, but I just can't seem to figure out what's wrong with the graphic login.

    I am a complete rookie when it comes to Linux/Ubuntu, so keep that in mind. Thanks in advance for any advice you can offer.

    • Mitch
      Mitch almost 11 years
      Did you change the users password?
    • Troy Pruyt
      Troy Pruyt almost 11 years
      Unless you're referring to something I'm confused about, yes. I changed the root user's password using instructions I found online. It worked, because as I said above, after changing the password, I can successfully login to the text interface (CTRL-ALT-F1). However, when I try to login to the graphical interface, it just blinks the screen for a split second and returns to the login screen.
    • Mitch
      Mitch almost 11 years
      What user name have you used when you installed Ubuntu?
    • psukys
      psukys almost 11 years
      You cannot login to gui with root by default, if that's what you're trying to do.
    • Troy Pruyt
      Troy Pruyt almost 11 years
      Mitch: There's only one account that shows up, which I believe is the username I created/used during installation. Shookies: You may be onto something that I didn't know: The account name on the gui, is my full name, and I assumed that was an account name and the username was hidden. (For example. The root UN is "troy", which is what I've been working with, but the account shown on the gui is "Troy Pruyt". I am so unfamiliar with linux/ubuntu, I assumed that was just a display name and that the username for that account was "troy". Maybe I'm wrong and it's different? How can i look up UN's?
  • Troy Pruyt
    Troy Pruyt almost 11 years
    CTRL-ALT-T does nothing when I type it, however I can tell you that I have already changed the password those command(s) using prompts available when I type CTRL-ALT-F1. Does your method do something different?
  • Troy Pruyt
    Troy Pruyt almost 11 years
    Mitch: As I said before, in response to the first time you suggested this: There is only one apparent account and I cannot think of any other account name I would create during installation. I have changed password for the user associated with /home which if I understand correctly is the root. ("troy"). I do not know of any other username I would use during installation, and I don't know how to find out if there are any other usernames to change passwords to. Additionally, when I run the command "ls /home" only "troy" is listed.
  • Troy Pruyt
    Troy Pruyt almost 11 years
    Also, I apologize if I have confused some terminology related to "root" etc. I am a n00b with ubuntu. I have ran the command "column -nts: /etc/passwd" which as I understand it should show me all of the users on the system. The only ones that look like actual USER accounts are mine "troy" and something called "saned" which I don't think is something I created. The rest are all clearly system items.