Thanks for your kind reply, it is very helpful as I didn't know -a or -m weren't needed and that MD5 was default as it looked like SHA was the default from the command output
My point was that in an earlier post, -a was used which doesn't work for me. See the output. I don't get an error, I just get the help. I was looking to script it, but it didn't work when I typed it manually. I later found -m worked and didn't investigate further as I got what I needed
Yes we don't need to use -m md5 but -m md5 works if it is used regardless if it is needed or not. The command works if I use -m or if I don't use -m. See below:
# cryptpw –a md5 NewPassword
BusyBox v1.36.1 (2024-03-18 18:58:40 IST) multi-call binary.
Usage: cryptpw [-P FD] [-m TYPE] [-S SALT] [PASSWORD] [SALT]
Print crypt(3) hashed PASSWORD
-P N Read password from fd N
-m TYPE des,md5,sha256/512 (default )
-S SALT
# cryptpw -m md5 NewPassword
$1$pztzUpMk$wCHZ57cZzc6p1lpDKJ/TR0
# cryptpw NewPassword
$1$OWyL25XG$uw3.N0yi1el.tPLXS.M6P/
# fw ver
This is Check Point's 1570 Appliance R81.10.17 - Build 654