I enabled logging to my remote Kubuntu computer with a public/private key following this short tutorial, and now logging is easy and doesn't ask for password.

Anyway, I noticed when I try to sudo, I'm asked for a password and when entered it says it's incorrect. And since I cannot sudo, I cannot modify the sshd_config or other root files.

I even cannot login to the physical machine using my own password, so all in all, I'm stuck.

How do I enable back the password authentication? (knowing that I cannot use sudo now) Thanks.

  • Just to cover the basics, when using sudo, are you entering your password (the correct answer), or the root password (the incorrect answer)?
    – DopeGhoti
    Commented May 24, 2017 at 18:22
  • I enter my user password (I don't even know the root password). This is the output in the console: [sudo] password for <my-username>: sudo: 1 incorrect password attempt
    – Mapl
    Commented May 24, 2017 at 18:26

1 Answer 1


The relevant part of the tutorial is this:

At this point, user’s account on the server can be locked for password authentication. On Linux systems, one can make:

[email protected]:~# passwd -l ornellas

So, if you followed this part of the tutorial you've locked your password. The only way to resolve this is either to use a root account to unlock your password, or boot with a rescue disk and fix up the passwd/shadow file directly:

passwd -u ornellas
  • Since I don't know the root password, I guess I'm only left with the second option, to boot with a rescue disk. @roaima can I use the Kubuntu installation cd for this purpose? Please explain how it's done briefly. Tnx
    – Mapl
    Commented May 24, 2017 at 18:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .