<div dir="ltr"><div dir="ltr">On Fri, Apr 3, 2020 at 2:41 PM Charles M <<a href="mailto:chaslinux@gmail.com">chaslinux@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have a PHP application that has some users stored in a mysql<br>
database. I can log into mysql and have permission to change the<br>
database tables. If the table within the database is called users can<br>
I just:<br>
<br>
INSERT into user (userpass) values ('NewMadeUpPass');<br>
<br>
Would this work since MySQL hashes passwords? I'd then log into the<br>
web app and change the password, hopefully rehashing the new password.</blockquote><div><br></div><div>The passwords in Drupal are hashed.</div><div><br></div><div>For Drupal 7, use the command line script that generates it:</div><div><br></div><div>$ cd /whereever/drupal/is</div><div><br></div><div>$ ./scripts/password-hash.sh your-password</div><div><br></div><div>Then, you can do:</div><div><br></div><div>UPDATE users SET pass = 'hash-from-previous-step' WHERE uid = 123;</div><div><br></div><div>If you want to create a new user, then you need to use drush:</div><div><br></div><div>$ drush help user-create</div></div></div>