You mount the Windows system drive in Ubuntu, then in terminal cd into /[MountedDrive]/Windows/System32/config and then run
chntpw -e SYSTEM