<div dir="ltr">Here is the string I am using 'UPDATE virtual_users SET password=ENCRYPT(%p,concat('$6$',substring(sha(rand()),-16))), WHERE email=%u LIMIT 1';<div><br></div><div>However, now roundcube is crashing and I am seeing this error</div><div><br></div><div><div>[06-Mar-2017 22:30:32 America/New_York] PHP Parse error: syntax error, unexpected '$' in /var/www/roundcube/roundcubemail-1.2.1/plugins/password/config.inc.php on line 106</div></div><div><br></div><div>Not sure what I am missing....</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 6, 2017 at 5:27 PM, Matt Graham <span dir="ltr"><<a href="mailto:mhgraham@crow202.org" target="_blank">mhgraham@crow202.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On Mon, Mar 6, 2017 at 9:20 AM, Matt Graham <<a href="mailto:mhgraham@crow202.org" target="_blank">mhgraham@crow202.org</a>> wrote:<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I think this isn't quite right, because the salt has to end<br>
with a $ according to the man page for crypt. I think you<br>
want CONCAT('$6$', SUBSTRING(SHA(RAND()), -16),'$')) but<br>
</blockquote></span></blockquote><span class="">
On 2017-03-06 10:07, Herminio Hernandez, Jr. wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I was following the tutorial the digital had. I am not a mysql expert<br>
so you could be right.<br>
</blockquote>
<br></span>
Actually trying this with a recent mysql shows that "select encrypt('string','$6$d6066e43f<wbr>b301519$');" and "select encrypt('string','$6$d6066e43f<wbr>b301519');" return the same results. So unlike the man page for crypt(), mysql adds the missing final $ for you. Or the crypt() function doesn't actually care. So you're probably fine and it'll all work.<div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
Crow202 Blog: <a href="http://crow202.org/wordpress" rel="noreferrer" target="_blank">http://crow202.org/wordpress</a><br>
There is no Darkness in Eternity<br>
But only Light too dim for us to see.<br>
------------------------------<wbr>---------------------<br>
PLUG-discuss mailing list - <a href="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank">PLUG-discuss@lists.phxlinux.or<wbr>g</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" rel="noreferrer" target="_blank">http://lists.phxlinux.org/mail<wbr>man/listinfo/plug-discuss</a></div></div></blockquote></div><br></div>