{"id":176,"date":"2012-08-07T10:30:37","date_gmt":"2012-08-07T10:30:37","guid":{"rendered":"https:\/\/satyadeep.in\/blog\/?p=176"},"modified":"2020-11-04T17:19:21","modified_gmt":"2020-11-04T11:49:21","slug":"drupal-7-password-reset","status":"publish","type":"post","link":"https:\/\/satyadeep.in\/blog\/drupal-7-password-reset\/","title":{"rendered":"Drupal 7 Password Reset"},"content":{"rendered":"<p>All of us have at one time or another forgotten our Drupal Installation password. After you\u2019ve tried all those likely combinations, you still cannot login in. Isn\u2019t that frustrating?<\/p>\n<p>Here\u2019s a simple way to reset the password assuming, you have access to the associated database.<\/p>\n<p>First up, if you have shell access to your Drupal installation folder, then &nbsp;open up the shell and browse to the Drupal root folder.<\/p>\n<p>Next run this built in Drupal script to create the new password hash php .\\scripts\\password-hash.sh \u201c<em>newpassword<\/em>\u201d Replace &nbsp;<em>newpassword&nbsp;<\/em>with the password that you\u2019d like to set. Do NOT exclude the double quotes. Copy the password hash that you get after&nbsp;running the above command.<\/p>\n<p><strong>Resetting the password in the database<\/strong><\/p>\n<p><strong>Step 1<\/strong>&nbsp;Open phpMyAdmin and open the database associated with your Drupal Installation. Within the Drupal database, browse to the table named \u201c<em>users\u201d<\/em>.<\/p>\n<p>Note: If you had setup a database prefix while installing Drupal, the table name will be \u201c<em>prefixname<\/em>_users\u201d.<\/p>\n<p><strong>Step 2&nbsp;<\/strong>In the \u201cusers\u201d table , find the row that has the admin user (or any user whose password needs to be reset) and click on \u201cEdit\u201d on that row.<\/p>\n<p><a href=\"https:\/\/satyadeep.in\/blog\/wp-content\/uploads\/2012\/08\/Drupal-Password-Reset.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-178\" title=\"Drupal Password Reset\" src=\"https:\/\/satyadeep.in\/blog\/wp-content\/uploads\/2012\/08\/Drupal-Password-Reset.png\" alt=\"\" width=\"1920\" height=\"990\" srcset=\"https:\/\/satyadeep.in\/blog\/wp-content\/uploads\/2012\/08\/Drupal-Password-Reset-300x154.png 300w, https:\/\/satyadeep.in\/blog\/wp-content\/uploads\/2012\/08\/Drupal-Password-Reset-1024x528.png 1024w, https:\/\/satyadeep.in\/blog\/wp-content\/uploads\/2012\/08\/Drupal-Password-Reset.png 1920w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 3<\/strong>&nbsp;You\u2019ll get a screen with several rows and columns. Find the row that has \u201cpass\u201d and in the \u201cValue\u201d Column of that row, delete the current value and paste the password hash (not the actual password) that you&nbsp;generated&nbsp;in the step above&nbsp;.<\/p>\n<p><strong>Step 4<\/strong>&nbsp;After that click on the \u201cGo\u201d button to save the new password.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/satyadeep.in\/blog\/wp-content\/uploads\/2012\/08\/Drupal-Password-Reset-2.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-179\" title=\"Drupal Password Reset 2\" src=\"https:\/\/satyadeep.in\/blog\/wp-content\/uploads\/2012\/08\/Drupal-Password-Reset-2.png\" alt=\"\" width=\"1916\" height=\"979\" srcset=\"https:\/\/satyadeep.in\/blog\/wp-content\/uploads\/2012\/08\/Drupal-Password-Reset-2-300x153.png 300w, https:\/\/satyadeep.in\/blog\/wp-content\/uploads\/2012\/08\/Drupal-Password-Reset-2-1024x523.png 1024w, https:\/\/satyadeep.in\/blog\/wp-content\/uploads\/2012\/08\/Drupal-Password-Reset-2.png 1916w\" sizes=\"(max-width: 1916px) 100vw, 1916px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>You can now login using your new password. Hope this post was helpful<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>All of us have at one time or another forgotten  [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[18],"tags":[19,20],"class_list":["post-176","post","type-post","status-publish","format-standard","hentry","category-drupal","tag-drupal-2","tag-password-reset"],"_links":{"self":[{"href":"https:\/\/satyadeep.in\/blog\/wp-json\/wp\/v2\/posts\/176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/satyadeep.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/satyadeep.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/satyadeep.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/satyadeep.in\/blog\/wp-json\/wp\/v2\/comments?post=176"}],"version-history":[{"count":6,"href":"https:\/\/satyadeep.in\/blog\/wp-json\/wp\/v2\/posts\/176\/revisions"}],"predecessor-version":[{"id":219,"href":"https:\/\/satyadeep.in\/blog\/wp-json\/wp\/v2\/posts\/176\/revisions\/219"}],"wp:attachment":[{"href":"https:\/\/satyadeep.in\/blog\/wp-json\/wp\/v2\/media?parent=176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/satyadeep.in\/blog\/wp-json\/wp\/v2\/categories?post=176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/satyadeep.in\/blog\/wp-json\/wp\/v2\/tags?post=176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}