<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Fajar,<div><br></div><div>How did you generate that hash? md5sum of "testpass" doesn't return that value for me.</div><div><br><div><div>On 19-Jan-2011, at 3:07 PM, Fajar A. Nugraha wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Wed, Jan 19, 2011 at 12:39 PM, Mark <span dir="ltr"><<a href="mailto:mark@edgewire.sg">mark@edgewire.sg</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
Hi folks,<br>
<br>
Been trying to look for information on this but haven't been able to find anything, prompting me to turn to the mailing list for help.<br>
<br>
In the event of using salted md5 hashes for passwords, where exactly does one store the salt?</blockquote><div><br></div><div>In the beginning of the password.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
 There doesn't seem to be a place within the FR config  to do that. Any advice would be much appreciated.<br>
<br></blockquote><div><br></div><div>No special place needed.</div><div><br></div><div>You're probably confusing MD5-Password and Crypt-Password (which in turn can use MD5 hash). For example, if you use PAP, these three attributes will allow access when user enter password "testpass":</div>
<div><br></div><div><div>Cleartext-Password := "testpass"</div><div>MD5-Password := "179ad45c6ce2cb97cf1029e212046e81"</div><div>Crypt-Password := "$1$12345678$duTc/02K9TK/XCYFyofbZ/"</div></div>
<div><div><div>Crypt-Password := "122U0BPYjrauc"</div></div></div><div><br></div><div>MD5-Password does not have any salt.</div><div>Crypt-Password in the first example has the salt "$1$12345678$", with MD5-based hash (crypted passwords have the hash in front of them, which for MD5 starts with $1$ and is 12 characters long)</div>
<div><div><div>Crypt-Password in the second example has the salt "12", with DES-based hash</div>
<div></div></div></div><div><br></div><div>See also:</div><div><a href="http://freeradius.org/radiusd/man/rlm_pap.txt">http://freeradius.org/radiusd/man/rlm_pap.txt</a></div>
<div><a href="http://en.wikipedia.org/wiki/Crypt_(Unix)#MD5-based_scheme">http://en.wikipedia.org/wiki/Crypt_(Unix)#MD5-based_scheme</a></div><div><a href="http://id.php.net/manual/en/function.crypt.php">http://id.php.net/manual/en/function.crypt.php</a></div>
<div><br></div><div>-- </div><div>Fajar</div></div>
-<br>List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Courier New'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>Kind regards,</div><div><br></div><div>Mark</div></span>
</div>
<br></div></body></html>