[Bug 1955163] Re: passwd command somehow screwed up the password, lost access to the machine
Paul White
1955163 at bugs.launchpad.net
Fri Dec 17 16:23:39 UTC 2021
** Package changed: ubuntu => shadow (Ubuntu)
** Tags added: focal
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to shadow in Ubuntu.
https://bugs.launchpad.net/bugs/1955163
Title:
passwd command somehow screwed up the password, lost access to the
machine
Status in shadow package in Ubuntu:
New
Bug description:
I had a fresh install of Ubuntu 20.4 Desktop on a server (yes, desktop on a server).
The only extra package installed was ssh.
It was a fresh install of 20.4 desktop as downloaded from the official
website, plus the ssh package (and any dependency) installed via apt.
The user created during installation was xxxxx with password "xxxxx"
(not the real credentials, I'm using fake ones here, but the username
was the same as the password).
I logged in via SSH with user xxxxx:
> ssh xxxxx at 123.123.123.123 (obviously this wasn't the real IP)
was prompted for the password, entered it, and I was in.
Then I did:
> sudo passwd xxxxx
(yes I could probably just have done "passwd" without sudoing and
without specifying the user, so I would have changed my own password.
But that should be the same. I'm sudoing to change the password of an
arbitrary user that happens to be myself. No reason why that shouldn't
work).
So I was prompted for the current password (because sudo), which I
entered, and then I was prompted for a new password that I had to
repeat twice and so I did. Let's say the new password was 12345678.
Actually (this shouldn't be relevant), I copied the password from
somewhere else and pasted it both times.
I got a message saying the password was changed successfully.
Then I logged out with:
> exit
Now I can't ssh to it anymore.
When I do:
> ssh xxxxx at 123.123.123.123
and enter the new password, it says "Permission denied, please try again."
I tried the old password too, with no success.
I also tried ssh root at 123.123.123.123, both with the old and new
password, but unsurprisingly that doesn't work either (I don't think
the root user actually has a password at all, right? and if it does,
there's no reason it should be any of those two).
I also tried entering nothing when prompted for the password (just the
Enter key, i.e. an empty password, thinking maybe the copy-paste was
what failed for whatever reason), but no.
And I also tried both pasting the password and manually typing it.
I'm not asking for help, I'm reporting a bug because whatever happened
here, it shouldn't have happened and it caused me to lose access to
the machine forever. Luckily it was a freshly installed system so it's
no big deal, but in principle this is a disaster.
There's no way I can have mis-typed the password at any stage, because I had it in a text file before I started and I copied and pasted it from there. If somehow some character got screwed up by pasting, and what was saved is not the string that I copied, that would be a bug.
My local machine is linux too and I use a konsole terminal to ssh to
the remote machine. To paste copied text I use Ctrl+Shift+V which
generally work (I use it all the time to paste into the terminal both
locally and when connected via ssh to other remote machines).
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/shadow/+bug/1955163/+subscriptions
More information about the foundations-bugs
mailing list