Subject: Re: user password
To: None <netbsd-help@netbsd.org>
From: Stefan Schumacher <stefan@net-tex.de>
List: netbsd-help
Date: 08/21/2005 19:34:20
Jeremy C. Reed <reed <at> reedmedia.net> writes:
> Does anyone know if we have a tool that allows you to choose the cipher
> type (like md5, blowfish, des) and other attributes (like rounds or salt)
> to create hashes (from stdin or command line)? Maybe openssl(1) could be
> used to create hashes that are compatible with crypt(3)?
apg can produce old style crypt passwords with -y, eg:
$> apg -y -n1
MuWinbawt SdUc2.6R0nAOY
$>
but that would require one to use "localcipher = old".
OpenSSL has "passwd" to produce several password hashes, eg:
#> useradd -p `openssl passwd MyPassword` username
to produce an "old" password or
#> useradd -p `openssl -1 passwd MyPassword` username
to produce "md5" style passwords.
SHA1 and Blowfish are lacking, but I guess it should be no big problem to add
those algorithms.