Changing user password without putting the old one (Linux)

PROBLEM: I need to change password, but I do not remember the old one.
SOLUTION: Simple one line command saves the day!

root:~# sudo passwd $USER

And yes, you have to be logged as root or be able to use sudo.

Leave a Reply

Your email address will not be published. Required fields are marked *