Is there something wrong with
https://trisquel.info/forum/locked-out-admin-log#comment-105213 i.e. with
'chroot'ing the root partition and simply running 'passwd koude'? That looks
easier and less prone to error.
You did not have to reinstall the operating system. To change a password
(not knowing the current one) using a live system, you could have followed
the instructions I gave in the post you linked to at the beginning of this
thread:
You can create a live CD/DVD/USB (with GNU/Linux on it, whatever the
distribution) from another system (even from Windows or MacOS) too.