Can I reset root password?

Can I try that commands before reinstall or could lode the data I didnt transfer yet?