{"id":21580,"date":"2023-09-30T14:31:29","date_gmt":"2023-09-30T14:31:29","guid":{"rendered":"https:\/\/linuxways.net\/?p=21580"},"modified":"2023-09-30T14:32:12","modified_gmt":"2023-09-30T14:32:12","slug":"how-to-change-root-password-in-linux-ubuntu-root","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-change-root-password-in-linux-ubuntu-root\/","title":{"rendered":"How to Change Root Password in Linux\/Ubuntu Root?"},"content":{"rendered":"<p>Ubuntu is a Multi-user Operating system and changing the Root password occasionally helps the administrator avoid any unauthorized access to the Ubuntu System. As the Root has complete access to the Ubuntu Operating system, any unauthorized access to the system may lead to a data breach and has to be avoided.<\/p>\n<p>In this article, we will explain multiple approaches to change the Sudo User or Root password in Ubuntu.<\/p>\n<h2><strong>How to Change Root Password in Linux\/Ubuntu Root?<\/strong><\/h2>\n<p>Changing the Root Password at times is useful for the overall security of Ubuntu Systems. Root Password can be changed either by using the GUI or the Terminal. Both methods for changing the root password are discussed below.<\/p>\n<h2><strong>Method 1: Change the Root Password in Ubuntu Using the Terminal<\/strong><\/h2>\n<p>The Root Password in Ubuntu can be changed easily using the \u201cpasswd\u201d command in Terminal. The following steps explain the method to change the sudo user password or root password.<\/p>\n<h3><strong>Step 1: Open Terminal<\/strong><\/h3>\n<p>To start Terminal using the GUI, navigate to the \u201cShow Applications\u201d Menu by clicking on the \u201cApplications Menu\u201d icon:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1630\" height=\"911\" class=\"wp-image-21581\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-1.png 1630w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-1-300x168.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-1-1024x572.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-1-768x429.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-1-1536x858.png 1536w\" sizes=\"auto, (max-width: 1630px) 100vw, 1630px\" \/><\/p>\n<p>Once you are in the Applications Menu, look for the Search Bar on top of the Menu. Click on it and type \u201cterminal\u201d. The Terminal Application will appear:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1098\" height=\"330\" class=\"wp-image-21583\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-2.png 1098w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-2-300x90.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-2-1024x308.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-2-768x231.png 768w\" sizes=\"auto, (max-width: 1098px) 100vw, 1098px\" \/><\/p>\n<p>Click on the terminal icon to start it:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"285\" class=\"wp-image-21584\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-3.png 621w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-3-300x138.png 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/p>\n<p>You can also open the terminal directly by pressing the \u201cctrl+alt+t\u201d shortcut keys:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1514\" height=\"460\" class=\"wp-image-21585\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-4.png 1514w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-4-300x91.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-4-1024x311.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-4-768x233.png 768w\" sizes=\"auto, (max-width: 1514px) 100vw, 1514px\" \/><\/p>\n<h3><strong>Step 2: Change Root Password<\/strong><\/h3>\n<p>In the terminal, run the \u201cpasswd\u201d Command to change the Root Password. The \u201cpasswd\u201d command changes the user password. In our case, the user is root:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">passwd<\/span> root<\/div><\/div>\n<p>The command line will ask for a new password:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1097\" height=\"95\" class=\"wp-image-21586\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-5.png 1097w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-5-300x26.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-5-1024x89.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-5-768x67.png 768w\" sizes=\"auto, (max-width: 1097px) 100vw, 1097px\" \/><\/p>\n<p>Once you enter the password, it will confirm by asking you to retype the password:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1100\" height=\"112\" class=\"wp-image-21587\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-6.png 1100w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-6-300x31.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-6-1024x104.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-6-768x78.png 768w\" sizes=\"auto, (max-width: 1100px) 100vw, 1100px\" \/><\/p>\n<p>Enter the same password that you provided earlier and hit \u201cEnter\u201d. The root password will be updated successfully:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1107\" height=\"146\" class=\"wp-image-21588\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-7.png 1107w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-7-300x40.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-7-1024x135.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-7-768x101.png 768w\" sizes=\"auto, (max-width: 1107px) 100vw, 1107px\" \/><\/p>\n<h3><strong>Step 3: Verify the Change<\/strong><\/h3>\n<p>To verify whether the new password was updated or not, use the \u201csudo\u201d command with the \u201c-i\u201d flag to log in as the root user in the terminal:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"re5\">-i<\/span><\/div><\/div>\n<p>The Terminal will ask for the password, add the updated password and hit Enter:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"103\" class=\"wp-image-21589\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-8.png 614w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-8-300x50.png 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/p>\n<p>The terminal command line will change to \u201croot\u201d indicating the root user is logged in and the password was changed:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"60\" class=\"wp-image-21590\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-9.png 621w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-9-300x29.png 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/p>\n<p>To log out of the root user, use the \u201cexit\u201d command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw3\">exit<\/span><\/div><\/div>\n<p>The root user will log out and the log out will be confirmed in the terminal:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"91\" class=\"wp-image-21591\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-10.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-10.png 621w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-10-300x44.png 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/p>\n<p>This is how you can change the Root Password from the Terminal.<\/p>\n<h2><strong>Method 2: Change the Root Password in Ubuntu using the GUI<\/strong><\/h2>\n<p>The User Account Password can also be changed using the GUI. Open the \u201cShow Applications\u201d Menu by clicking on the \u201cShow Applications\u201d icon:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" class=\"wp-image-21592\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-11.png 1920w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-11-300x169.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-11-1024x576.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-11-768x432.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-11-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>In the Menu, click on the \u201cSettings\u201d icon:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" class=\"wp-image-21593\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-12.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-12.png 1920w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-12-300x169.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-12-1024x576.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-12-768x432.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-12-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>The Settings Menu will appear. Click on the \u201cUsers\u201d Option from the left navigation bar:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"597\" class=\"wp-image-21594\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-13.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-13.png 728w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-13-300x246.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/p>\n<p>The User Menu will appear:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" class=\"wp-image-21595\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-14.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-14.png 1920w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-14-300x169.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-14-1024x576.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-14-768x432.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-14-1536x864.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>In the User Details Menu, click on the Password Option inside the \u201cAuthentication &amp; Login\u201d Settings:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"918\" height=\"655\" class=\"wp-image-21596\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-15.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-15.png 918w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-15-300x214.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-15-768x548.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/p>\n<p>A new dialogue box will appear having the \u201cChange Password\u201d Settings:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"291\" class=\"wp-image-21597\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-16.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-16.png 495w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-16-300x176.png 300w\" sizes=\"auto, (max-width: 495px) 100vw, 495px\" \/><\/p>\n<p>To change the password, click on the Current Password Input Box and type in the Current Root Password:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"291\" class=\"wp-image-21598\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-17.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-17.png 495w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-17-300x176.png 300w\" sizes=\"auto, (max-width: 495px) 100vw, 495px\" \/><\/p>\n<p>The \u201ctick\u201d icon inside the Text Box confirms the correct password pattern:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"296\" class=\"wp-image-21599\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-18.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-18.png 495w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-18-300x179.png 300w\" sizes=\"auto, (max-width: 495px) 100vw, 495px\" \/><\/p>\n<p>Now enter the \u201cNew Password\u201d. Ensure that you use a mixture of characters that follow the password pattern for better security. The bar below highlights the strength of your password:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"293\" class=\"wp-image-21600\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-19.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-19.png 495w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-19-300x178.png 300w\" sizes=\"auto, (max-width: 495px) 100vw, 495px\" \/><\/p>\n<p>Once you have entered the password, click on the \u201cChange\u201d button to apply the changes and your password changes:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"497\" height=\"298\" class=\"wp-image-21601\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-20.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-20.png 497w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21580-20-300x180.png 300w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/p>\n<p>The dialogue box will close meaning the root password was changed successfully.<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>The Root Password can be changed either using the Terminal or the GUI. The \u201cpasswd\u201d command changes the sudo user or root password in Terminal. Using the GUI, the root password is changed in the Account Settings. This article discusses both methods for converting the password of sudo user or root in Ubuntu.<\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>To change the root password in the terminal, the \u201cpasswd\u201d command is used. Using the GUI, the root password can be changed from the User Account Settings. <\/p>","protected":false},"author":110,"featured_media":21582,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1049,2],"tags":[],"class_list":["post-21580","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-commands","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/21580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=21580"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/21580\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/21582"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=21580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=21580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=21580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}