I did this and my site gave an internal error (500), I removed it and it got back to working order.
I also tried the following code in /site/templates/home.php and got no internal errors, but I still can't access as an admin user.
$u = $users->get('admin'); // or whatever your username is
$u->of(false);
$u->pass = 'anypassword';
$u->save();
Thanks in advance!