Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Users passwords reset...Is it possible?

Quote Reply
Users passwords reset...Is it possible?
Hi


Is there a way to rest all the CURRENT existing passwords in the users or editors table to a default one.


Regards
Abd

http://www.idleb.com
Quote Reply
Re: Users passwords reset...Is it possible? In reply to
SQL Monitor (MySQLMan)

Code:

UPDATE Users SET Password = 'default'


Regards,

Eliot Lee
Quote Reply
Re: Users passwords reset...Is it possible? In reply to
how can use the command to setup passwords to random?
the reason i'm asking this is because i have no passwords to any user

Quote Reply
Re: Users passwords reset...Is it possible? In reply to
Thanks Eliot

Regards
Abd

http://www.idleb.com
Quote Reply
Re: Users passwords reset...Is it possible? In reply to
hi theguy,

i think this hint may help you. i've written it in PHP3, but of course you can modify to what you want, CGI(Perl) perhaps. i just used the actual date and the id to create passwords :

<?php
$db = mysql_connect("rdbms....","username","password");
mysql_select_db("YourDatabase",$db);

$sql = "SELECT ID from Links";
$result = mysql_query($sql);

while ($myrow = mysql_fetch_array($result))
{
$getid = $myrow['ID'];

$newpw = $getid * date("z") * date("j");

$sqlb = "UPDATE Users SET Password = $newpw WHERE [...however, make sure thats the correct user who belongs to this ID...] ";

$resultb = mysql_query($sqlb);

}

mysql_close($db);

?>

---------

Hope this helps,


Manu

Quote Reply
Re: Users passwords reset...Is it possible? In reply to
I wrote a php script that uses the random password generator from WWWThreads adduser.php file. if you have w3t you can use that.

Quote Reply
Re: Users passwords reset...Is it possible? In reply to
You can actual use the RAND (random) function within MySQL to create random passwords....search http://www.mysql.com

Regards,

Eliot Lee
Quote Reply
Re: Users passwords reset...Is it possible? In reply to
thankyou Eliot!

UPDATE Users SET Password = RAND()

for those of you who ugraded from links2 and have long passwords you might want to consider using this function to make it easier

Quote Reply
Re: Users passwords reset...Is it possible? In reply to
You're welcome...knew you would figure it out...

Regards,

Eliot Lee