Results 1 to 7 of 7

Thread: Reset Password without reboot or sudo

  1. #1
    Join Date
    Jan 2009
    Location
    Pennsylvania
    Beans
    113
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Question Reset Password without reboot or sudo

    Hello,

    I forgot my password, which is also the root password to my linux box at work. I can still log in remotely and get shell access. I don't enter password at login because I use sshkeys (perhaps this is how I can get the password back?)

    I cannot reboot because people are using the machine, and I don't have root access anyway.

    I am getting desperate, and I realize this is my own fault for not writing it down.

    any help is appreciated,
    -Dave

  2. #2
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Reset Password without reboot or sudo

    Are there any other admin users on that machine that could be persuaded to reset your user password on your behalf with a temporary password, and then, for security, you can immediately change it to something else known only by you.

    Of course, if it is essential that you get back to your original password you may have a problem.

  3. #3
    Join Date
    Oct 2007
    Beans
    1,832

    Re: Reset Password without reboot or sudo

    You don't need sudo to change your password once you're logged in. Just issue the passwd command.

  4. #4
    Join Date
    May 2007
    Location
    Virginia, USA
    Beans
    13,377
    Distro
    Ubuntu Mate Development Release

    Re: Reset Password without reboot or sudo

    how I can get the password back?
    Basically -- you can't!

    So-called password recovery apps only allow you to blank or reset an existing password, not recover it.

    Also -- been a while since I used the "passwd" command, but (as indicated in the linked description), it firsts prompts for the EXISTING password -- which, if you don't get it right, I believe exits the command: http://manpages.ubuntu.com/manpages/.../passwd.1.html
    Ubuntu 20.04, Mint 19.10; MS Win10 Pro.
    Will not respond to PM requests for support -- use the forums.

  5. #5
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,619
    Distro
    Ubuntu

    Re: Reset Password without reboot or sudo

    Quote Originally Posted by llamabr View Post
    You don't need sudo to change your password once you're logged in. Just issue the passwd command.
    You still need to enter the old password...
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  6. #6
    Join Date
    Jan 2009
    Location
    Pennsylvania
    Beans
    113
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Re: Reset Password without reboot or sudo

    hello deadflowr, llamabr, and ajgreeny,

    it looks like I'm going to have to talk to the other user in real life and ask him when I can reboot and go through standard password reset procedures. Otherwise I have to bring my laptop in every day to log in with ssh keys, which is silly.

    I've been using Ubuntu for 8 years now and never had this problem... lesson learned.... I got overconfident.

    -Dave

  7. #7
    Join Date
    Jan 2009
    Location
    Pennsylvania
    Beans
    113
    Distro
    Ubuntu 14.10 Utopic Unicorn

    Re: Reset Password without reboot or sudo

    Hello,

    I found a solution to this this morning:

    if you logged in with ssh keys, all you have to do is tarball your ~/.ssh directory and copy to a new computer to log in. I think of the .ssh directory as like the password I forgot.

    An additional solution to my problem, which is gone now, thank God.

    -Dave

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •