{"id":170,"date":"2008-08-10T13:06:48","date_gmt":"2008-08-10T10:06:48","guid":{"rendered":"http:\/\/patchlog.com\/?p=170"},"modified":"2008-08-11T22:40:30","modified_gmt":"2008-08-11T19:40:30","slug":"recover-plesk-access","status":"publish","type":"post","link":"https:\/\/patchlog.com\/linux\/recover-plesk-access\/","title":{"rendered":"Recover plesk access"},"content":{"rendered":"<p>Here's a scenario: you're locked out of plesk admin, you forgot the password and can't recover cause your email address is not set in the contact details.  <\/p>\n<p>Still have ssh access as root (ssh keys or can still remember password for root ) ? Most of the time I use dsa keys for ssh authentication.<br \/>\nIf you do then you can change the password for admin. <\/p>\n<p>Plesk keeps it's password in the psa mysql database so you just have to change it in the psa.accounts table . But to have access to it you need access as root in mysql.<br \/>\nIf you don't have the password for root ( most likely on plesk servers ) you'll have to stop mysql and start it without privilege verification. <\/p>\n<pre><ol><li style=\"font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;\"><div style=\"font-family: 'Courier New', Courier, monospace; font-weight: normal;\">&nbsp;<\/div><\/li><\/ol><\/pre>\n<p>That would work on most linux distros , on some the stop script would be \/etc\/init.d\/mysqld   and  on others the path to the mysql server might be \/usr\/libexec\/mysqld .<br \/>\n use psa   <\/p>\n<p>Once you're logged in run this sql to change the password: <\/p>\n<pre><ol><li style=\"font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;\"><div style=\"font-family: 'Courier New', Courier, monospace; font-weight: normal;\">&nbsp;<\/div><\/li><\/ol><\/pre>\n<p>Now get out of the mysql client ( CTRL+C) and restart mysql to have privilege verification back or else everyone would be able to do what you just did:<\/p>\n<pre><ol><li style=\"font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;\"><div style=\"font-family: 'Courier New', Courier, monospace; font-weight: normal;\">&nbsp;<\/div><\/li><\/ol><\/pre>\n<p>Now you can login to plesk with the new password. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a scenario: you&#8217;re locked out of plesk admin, you forgot the password and can&#8217;t recover cause your email address is not set in the contact details. Still have ssh access as root (ssh keys or can still remember password for root ) ? Most of the time I use dsa keys for ssh authentication. &hellip; <a href=\"https:\/\/patchlog.com\/linux\/recover-plesk-access\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Recover plesk access<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2],"tags":[191,21,190,189,170],"class_list":["post-170","post","type-post","status-publish","format-standard","hentry","category-linux","tag-dsa-keys","tag-mysql","tag-password","tag-plesk","tag-ssh"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pofPh-2K","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/patchlog.com\/wp-json\/wp\/v2\/posts\/170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/patchlog.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/patchlog.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/patchlog.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/patchlog.com\/wp-json\/wp\/v2\/comments?post=170"}],"version-history":[{"count":3,"href":"https:\/\/patchlog.com\/wp-json\/wp\/v2\/posts\/170\/revisions"}],"predecessor-version":[{"id":173,"href":"https:\/\/patchlog.com\/wp-json\/wp\/v2\/posts\/170\/revisions\/173"}],"wp:attachment":[{"href":"https:\/\/patchlog.com\/wp-json\/wp\/v2\/media?parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/patchlog.com\/wp-json\/wp\/v2\/categories?post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/patchlog.com\/wp-json\/wp\/v2\/tags?post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}