{"id":63,"date":"2014-04-23T20:40:56","date_gmt":"2014-04-23T18:40:56","guid":{"rendered":"http:\/\/www.lambiek.eu\/blog\/?p=63"},"modified":"2014-07-10T08:08:23","modified_gmt":"2014-07-10T06:08:23","slug":"reset-owncloud-6-admin-password","status":"publish","type":"post","link":"https:\/\/www.lambiek.eu\/blog\/tutorial\/reset-owncloud-6-admin-password\/","title":{"rendered":"reset ownCloud 6 admin password"},"content":{"rendered":"<p>If you, just like me, forgot the admin password of your rather fresh ownCloud 6 installation, you can reset it using the following steps:<\/p>\n<ol>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">Log into the server hosting your owncloud installation<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">Navigate to the sites directory (ie: \/var\/www\/owncloud)<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">Fetch the salt from .\/config\/config.php<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">Navigate to the &#8216;phppass&#8217; 3rd party app (ie: \/3rdparty\/phpass)<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">edit the test.php file and replace the following:<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">edit $correct = &#8217;test12345&#8242;; to $correct = &#8216;yournewpass&#8217;.&#8217;yourconfigpasswordsalt&#8217;;<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">Run &#8216;php test.php&#8217;<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">Revert changes to test.php<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">Copy the first line that has &#8216;Hash: $2a&#8230;&#8217;<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">Log into your database (MySQL is the example)<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">mysql -u root -p<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">use owncloud;<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">select * from oc_users;<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">Note the password value, copy it just in case<\/span><\/li>\n<li><span style=\"font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;\">update oc_users set password= &#8216;generatedhash&#8217; where uid = &#8216;admin&#8217;;<\/span><\/li>\n<\/ol>\n<p>That&#8217;s it, you can now login using the new password.<\/p>\n<p>Reference:<\/p>\n<p><a href=\"https:\/\/forum.owncloud.org\/viewtopic.php?f=23&amp;t=10580\" target=\"_blank\">https:\/\/forum.owncloud.org\/viewtopic.php?f=23&amp;t=10580<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you, just like me, forgot the admin password of your rather fresh ownCloud 6 installation, you can reset it using the following steps: Log into the server hosting your owncloud installation Navigate to the sites directory (ie: \/var\/www\/owncloud) Fetch the salt from .\/config\/config.php Navigate to the &#8216;phppass&#8217; 3rd party app (ie: \/3rdparty\/phpass) edit the &#8230; <span class=\"more\"><a class=\"more-link\" href=\"https:\/\/www.lambiek.eu\/blog\/tutorial\/reset-owncloud-6-admin-password\/\">[Read more&#8230;]<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[10],"_links":{"self":[{"href":"https:\/\/www.lambiek.eu\/blog\/wp-json\/wp\/v2\/posts\/63"}],"collection":[{"href":"https:\/\/www.lambiek.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lambiek.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lambiek.eu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lambiek.eu\/blog\/wp-json\/wp\/v2\/comments?post=63"}],"version-history":[{"count":7,"href":"https:\/\/www.lambiek.eu\/blog\/wp-json\/wp\/v2\/posts\/63\/revisions"}],"predecessor-version":[{"id":139,"href":"https:\/\/www.lambiek.eu\/blog\/wp-json\/wp\/v2\/posts\/63\/revisions\/139"}],"wp:attachment":[{"href":"https:\/\/www.lambiek.eu\/blog\/wp-json\/wp\/v2\/media?parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lambiek.eu\/blog\/wp-json\/wp\/v2\/categories?post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lambiek.eu\/blog\/wp-json\/wp\/v2\/tags?post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}