Is it not easier to edit /etc/shadow? All as root (or sudo), Make a backup
Often, 1st line is
root:lots-of-random-letters: more fields::: ...........
delete everything between 1st and 2nd colon ": " ,, and then, no password
(so it appears as root::18281:0:99999:7::: OR root::18234:::::: OR root::17525:0:99999:7::: ,,,,
the 2nd, 3rd, 4th, and 5th field will vary depending on distro,, the password hash is in 1st field,
between 1st and 2nd colon)
Often, 1st line is
root:lots-of-random-letters: more fields::: ...........
delete everything between 1st and 2nd colon ": " ,, and then, no password
(so it appears as root::18281:0:99999:7::: OR root::18234:::::: OR root::17525:0:99999:7::: ,,,,
the 2nd, 3rd, 4th, and 5th field will vary depending on distro,, the password hash is in 1st field,
between 1st and 2nd colon)