On Thu, Mar 07, 2024 at 06:59:47PM +0100, Nicolas George wrote: > ~ $ perl -e 'print crypt("-password", "\$6\$username\$"), "\n"' > $6$username$FCvGwi21H/uVp89BtnZHWQsL.vZKajZ3lRbfB7Jnjr2C.5qBgx7TB3Ul3PbcyCIArts/C2lfQgYOLp418oH7C0
hobbit:~$ openssl passwd -6 -salt username -- -password $6$username$FCvGwi21H/uVp89BtnZHWQsL.vZKajZ3lRbfB7Jnjr2C.5qBgx7TB3Ul3PbcyCIArts/C2lfQgYOLp418oH7C0 Looks like you want the -- to separate options from non-option arguments, where the only non-option argument is "-password". What threw me for a few moments was that "-salt username" is a single option with argument. I wasn't expecting "username" to be the salt. It looked like a non-option argument at first.