encrypted password generator

Tony's Wiki

To generate a whirlpool encrypted password (such as used in friendica), I created http://tonybaldwin.me/mine/fpassgen.php

encrypted password generator

This is handy for those installing friendica on a home server without a mail server running, since they won't get their password mailed to them on registration. With this tool, they can generate a password, and then edit the user table of the database to paste this in as their password.

The code for the page is simply1):

<h2>encrypted password generator</h2>
<hr />
<p>Enter a text password and click "submit" to get the whirlpool encrypted string.</p>
<form action="fpassgen.php" method="get">
<input type="text" name=textpass>
<input type="submit">
</form>
<?php
 
if (isset($_GET['textpass'])) 
	{
	$textpass = $_GET['textpass'];
	$cryptpass = hash('whirlpool',$textpass);
		echo "<p>You entered:<br /> <strong><em>$textpass</em></strong></p>";
		echo "<p><strong>Your encrypted password is:</p>";
		echo "<p class=\"pass\"><font size=\"1\">&nbsp;&nbsp; $cryptpass</font></p>";
	}
?>
<hr />

If you are using this to generate a password for a friendica site, here is how you can use this password.

Log into the server, log into mysql, edit the table as follows:

mysql -u <username> -p 
enter password: 

mysql> use friendica; 
Database changed 

mysql> update user set password="a316fc1744898bcdc29440574143d370353af1ab2e1c0231635072064565d25073f5ab7a6aa2647999c79462534dea7091db204676bbeed11787d8227d7b6078" where uid="1"; 
mysql> exit;

This would change the password for the 1st user (uid=“1”, generally the admin) to “appleb0tt0m”. That encrypted string was generated with the password generator page.

To alter another user's password, you could use, instead of their uid, if you do not know it,

   where username="$username";

instead of

   where uid="1";

tonybaldwin 2012.04.16.02.09

find me on friendica

Need help? Leave a comment:

~~DISQUS~~

1)
released according to the GNU AFFERO GPL v. 3, http://www.gnu.org/licenses/agpl-3.0.html