[H-GEN] md5sum generation

Bruce Campbell bc at humbug.org.au
Mon Mar 27 01:41:21 EST 2006


On Mon, 27 Mar 2006, Russell Stuart wrote:

> On Sun, 2006-03-26 at 23:57 -0500, rickp at suntech.net.au wrote:
>> I am trying to bulk upload over 100 names to our newly installed Web
>> Calendar and I need to generate md5sum'ed passwords.  Luckily in this case,
>>
>> I know I cannot generate a checksum by doing -
>> md5sum password
>
> Either of these commands given to bash:
>
>  echo "password" | md5sum

286755fad04869ca523320acce0dc6a4

$ echo -n "password" | md5sum

5f4dcc3b5aa765d61d8327deb882cf99

( Passwords without end-of-line characters seem to work much better, imo )

>  md5sum <<<"$password"

$ password="password" md5 <<< "$password"
286755fad04869ca523320acce0dc6a4
$ password="`echo -n password`" md5 <<< "$password"
286755fad04869ca523320acce0dc6a4

--==--
Bruce.




More information about the General mailing list