0

First I need to say that I'm not pro Linux admin but web master trying to configure server. Though I am learning.

I disabled root ssh login in sake of security and then I forgot to save user account password in Keypass.

I can actually log in as user cause I set log in with SSH Auth keys. But I can't go sudo cause I don't know user's password.

But I know root password.

How can I either:

  1. Change user's password logged in as user but not knowing its password (though I know root's)
  2. Change ssh settings to enable root log in, after which I would be able to change user's password?
2

Use /bin/su rather than sudo. That uses root's password.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.