{"id":407,"date":"2024-08-18T17:10:13","date_gmt":"2024-08-18T17:10:13","guid":{"rendered":"https:\/\/www.erodewebhosting.com\/knowledgebase\/?p=407"},"modified":"2024-08-18T17:16:43","modified_gmt":"2024-08-18T17:16:43","slug":"how-to-reset-directadmin-password-from-ssh","status":"publish","type":"post","link":"https:\/\/www.erodewebhosting.com\/knowledgebase\/how-to-reset-directadmin-password-from-ssh\/","title":{"rendered":"How to reset directadmin password from SSH ?"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"reset-directadmin-password-from-ssh\">reset directadmin password from SSH<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>To reset DirectAdmin password from SSH, you will need to access <a href=\"https:\/\/www.erodewebhosting.com\/shared-web-hosting\/\">your\u00a0serve<\/a>r as a root\u00a0user.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#reset-directadmin-password-from-ssh\">reset directadmin password from SSH<\/a><ul><li><a href=\"#step-1-access-your-server-via-ssh\">Step 1: Access Your Server via SSH<\/a><\/li><li><a href=\"#step-2-retrieve-the-current-admin-password\">Step 2: Retrieve the Current Admin Password<\/a><\/li><li><a href=\"#step-3-reset-directadmin-password-from-ssh\">Step 3: Reset directadmin password from SSH<\/a><\/li><li><a href=\"#step-4-update-direct-admin-configuration\">Step 4: Update DirectAdmin Configuration<\/a><\/li><li><a href=\"#step-5-restart-direct-admin\">Step 5: Restart DirectAdmin<\/a><\/li><li><a href=\"#alternative-method-using-direct-admin-commands\">Alternative Method: Using DirectAdmin Commands<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-access-your-server-via-ssh\">Step 1: Access Your Server via SSH<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open your terminal or SSH client.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/vpswebhostingindia.com\/blog\/wp-content\/uploads\/2024\/05\/image-10.png\" alt=\"reset directadmin password from SSH\" class=\"wp-image-613\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Connect to your server using the root user. For example:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>   ssh root@your_server_ip<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-retrieve-the-current-admin-password\">Step 2: Retrieve the Current Admin Password<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Once you are logged in, you can retrieve the current <a href=\"https:\/\/www.squarebrothers.com\/web-hosting-india\/\" target=\"_blank\" rel=\"noopener\">DirectAdmin<\/a> admin password by running the following command:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">   cat \/usr\/local\/directadmin\/scripts\/setup.txt | grep adminpass<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/vpswebhostingindia.com\/blog\/wp-content\/uploads\/2024\/06\/image-4.png\" alt=\"\" class=\"wp-image-645\"\/><\/figure>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>This command will display a line similar to:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">   adminpass=your_current_password<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-reset-directadmin-password-from-ssh\">Step 3: Reset directadmin password from SSH<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>To reset the admin password, use the following command:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   passwd admin<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>You will be prompted to enter the new password and confirm it.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/vpswebhostingindia.com\/blog\/wp-content\/uploads\/2024\/06\/image-5.png\" alt=\"\" class=\"wp-image-646\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-update-direct-admin-configuration\">Step 4: Update DirectAdmin Configuration<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>After resetting the admin password, you need to update the DirectAdmin configuration with the new password. Run the following command:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>   echo \"adminpass=new_password\" &gt;&gt; \/usr\/local\/directadmin\/scripts\/setup.txt<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-5-restart-direct-admin\">Step 5: Restart DirectAdmin<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Finally, restart DirectAdmin to ensure the changes take effect:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   service directadmin restart<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/vpswebhostingindia.com\/blog\/wp-content\/uploads\/2024\/06\/image-6.png\" alt=\"\" class=\"wp-image-647\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"alternative-method-using-direct-admin-commands\">Alternative Method: Using DirectAdmin Commands<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>You can also use DirectAdmin\u2019s internal command to reset the admin password. Run the following:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   \/usr\/local\/directadmin\/directadmin set admin_pass new_password<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Restart DirectAdmin:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>   service directadmin restart<\/code><\/pre>\n\n\n\n<p>Make sure to replace&nbsp;<code>new_password<\/code>&nbsp;with the actual password you want to set.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>reset directadmin password from SSH To reset DirectAdmin password from SSH, you will need to access your\u00a0server as a root\u00a0user. Step 1: Access Your Server via SSH Step 2: Retrieve&hellip;<\/p>\n","protected":false},"author":1,"featured_media":408,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[65],"tags":[],"class_list":["post-407","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-reset-directadmin-password-from-ssh"],"_links":{"self":[{"href":"https:\/\/www.erodewebhosting.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.erodewebhosting.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.erodewebhosting.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.erodewebhosting.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.erodewebhosting.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=407"}],"version-history":[{"count":1,"href":"https:\/\/www.erodewebhosting.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/407\/revisions"}],"predecessor-version":[{"id":409,"href":"https:\/\/www.erodewebhosting.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/407\/revisions\/409"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.erodewebhosting.com\/knowledgebase\/wp-json\/wp\/v2\/media\/408"}],"wp:attachment":[{"href":"https:\/\/www.erodewebhosting.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.erodewebhosting.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.erodewebhosting.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}