Ubuntu – reset root password

I wanted to update a virtual machine from Ubunto 9.10 to 10.04 but I could not recall the root password. None of my standard passwords worked.
Google to the rescue, I found a way to reset the root password.

1) Login as non-root user
2) sudo su –
3) type in the password for the non-root user
4) passwd
5) set new root password

Now updating to Ubuntu 10.04