Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I booted in recovery mode and then typed:

mount -o rw,remount / passwd username

I got numerous options, none of them worked. Then I type passwd and hit enter. It asked for new password, I reset the password and exited the root system then tried to login, but it said the password is incorrect.

share|improve this question

1 Answer 1

"passwd" in recovery mode will set the root password, which is a bad idea. You need to use "passwd username" instead, where "username" is your actual username. Assuming your username is "u", the following two commands will do the trick:

mount -o remount,rw /
passwd u

Also, you should reset the root password to fix what you've already done:

passwd -dl root
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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