restorepassword.py -hexpass needs the hex-encoded plaintext machine password, which only comes from a local registry/LSA secrets dump ($MACHINE.ACC). A DCSync (-just-dc-user) returns only the NT hash, which -hexpass cannot use. Run a full secrets dump (no -just-dc* flags):