[Solved] Generating root password on host

I want to generate a root password for my LEDE based router on my Debian Linux machine, but I'm failing.

I've tried the following ways but those gave a result that doesn't match the existing, known root password in the /etc/shadow file.

mkpasswd -5 my_password
makepasswd --clearfrom=- --crypt-md5 <<< my_password

Could anyone help me how to generate such encrypted password that goes to /etc/shadow ?

Thanks,
Levente

So if I use the correct salt, I get the correct result.

Sorry for the noise.

Levente

BTW what was the correct salt anyway ( for us to know too)

greetings
3zl

I have this in /etc/shadow

root:$1$V3JojjNx$I5.YacKkjmkZHMmo56/df.:17575:0:99999:7:::

So the salt is V3JojjNx . But can be anything I guess.

Levente

passwd -a sha256