{"id":333,"date":"2010-07-03T05:17:34","date_gmt":"2010-07-03T11:17:34","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=333"},"modified":"2026-05-21T05:16:48","modified_gmt":"2026-05-21T11:16:48","slug":"reset-the-directadmin-password-through-the-shell","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/reset-the-directadmin-password-through-the-shell\/","title":{"rendered":"How to Reset DirectAdmin Password Through Shell ?"},"content":{"rendered":"\n<p>DirectAdmin is a popular web hosting control panel used to manage servers, websites, emails, and other hosting services. Sometimes, users may forget the admin password or need to reset it due to security reasons. In such cases, resetting the DirectAdmin password through the shell is a quick and effective solution.<\/p>\n\n\n\n<p>In this guide, we will explain simple methods to reset the DirectAdmin admin password using SSH access.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method 1: Reset Using DirectAdmin Setup Script<\/h2>\n\n\n\n<p>One of the easiest ways to reset the admin password is by using the DirectAdmin setup script.<\/p>\n\n\n\n<p>Login to your server via SSH and run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/directadmin\/scripts\/setup.txt<\/code><\/pre>\n\n\n\n<p>This script helps reconfigure DirectAdmin settings, including resetting or updating the admin password during the setup process.<\/p>\n\n\n\n<p>Make sure you have root access before executing the command. After running it, follow any on-screen instructions to complete the configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method 2: Reset Password Using the <code>passwd<\/code> Command<\/h2>\n\n\n\n<p>Another simple method is directly changing the admin password using the Linux password command.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Steps:<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to your server via SSH as root.<\/li>\n\n\n\n<li>Run 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=\"3\" class=\"wp-block-list\">\n<li>Enter a new password when prompted.<\/li>\n\n\n\n<li>Confirm the password by entering it again.<\/li>\n<\/ol>\n\n\n\n<p>Once completed, the new password will be active immediately, and you can use it to log in to DirectAdmin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Important Notes<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always ensure you have root or sufficient privileges before making changes.<\/li>\n\n\n\n<li>Choose a strong password for better security.<\/li>\n\n\n\n<li>After resetting, try logging into DirectAdmin to confirm the update.<\/li>\n\n\n\n<li>If one method does not work, use the alternative method mentioned above.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Resetting the DirectAdmin admin password through the shell is a simple and fast process. You can either use the setup script or the <code>passwd admin<\/code> command depending on your server configuration.<\/p>\n\n\n\n<p>These methods help server administrators quickly regain access and maintain control over their hosting environment without requiring complex steps.<\/p>\n\n\n\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><\/p>\n\n\n\n<p><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b\"><\/a><\/span><\/span><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>DirectAdmin is a popular web hosting control panel used to manage servers, websites, emails, and other hosting services. Sometimes, users may forget the admin password or need to reset it&hellip;<\/p>\n","protected":false},"author":4,"featured_media":17172,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/333"}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=333"}],"version-history":[{"count":3,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/333\/revisions"}],"predecessor-version":[{"id":17173,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/333\/revisions\/17173"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media\/17172"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}