{"id":7228,"date":"2019-01-06T07:19:19","date_gmt":"2019-01-06T07:19:19","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=7228"},"modified":"2019-01-08T12:34:37","modified_gmt":"2019-01-08T12:34:37","slug":"centos-change-password-linux-hint","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/06\/centos-change-password-linux-hint\/","title":{"rendered":"CentOS Change Password \u2013 Linux Hint"},"content":{"rendered":"<p>Passwords are the oldest and yet, effective form of security measure that almost every single system in the world offers to protect privacy and user data. In the case of CentOS, it\u2019s more important to make sure that everything is secure with a powerful password. However, in cases, passwords need to be changed. There can be a number of reasons, for example, the password being obsolete or disclosed in other security breaches etc. Today, let\u2019s check out the details changing the password on CentOS.<\/p>\n<h3>Changing the password<\/h3>\n<p>Note that there are 2 different types of passwords \u2013 \u201croot\u201d and user(s). If you\u2019re currently within the system, you can easily change the password with a few commands. If not, it will require a bit of a task to change the \u201croot\u201d password and then, the other user(s) password(s).<\/p>\n<h3>Change the current user password<\/h3>\n<p>Fire up a terminal \u2013<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/1-10.png\" alt=\"\" width=\"902\" height=\"206\" \/><br \/>\nRun the following command \u2013<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/2-10.png\" alt=\"\" width=\"892\" height=\"192\" \/><br \/>\nAt first, you have to enter the \u201croot\u201d password. Now, time to enter your new password \u2013<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/3-10.png\" alt=\"\" width=\"889\" height=\"209\" \/><br \/>\nOnce changed, you can see the success message.<\/p>\n<h3>Changing other user\u2019s password<\/h3>\n<p>This is also possible. However, make sure that whatever you\u2019re doing is the right thing. Don\u2019t forget to notify your system admin first!<\/p>\n<p>Enter the user account \u2013<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/4-11.png\" alt=\"\" width=\"891\" height=\"142\" \/><br \/>\nNow, use the \u201cpasswd\u201d tool for performing the password change \u2013<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/5-11.png\" alt=\"\" width=\"885\" height=\"200\" \/><br \/>\nVoila! The user now got a new password!<\/p>\n<h3>Changing the \u201croot\u201d password<\/h3>\n<p>The same technique applies for the \u201croot\u201d user as well. At first, enter the root \u2013<\/p>\n<p>Now, run the command for changing the password \u2013<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/6-10.png\" alt=\"\" width=\"876\" height=\"223\" \/><br \/>\nVoila! Password change successful!<\/p>\n<p>Now, in some cases, you forgot the passwords completely and not able to login into any other users, then the following steps must be followed. Make sure to follow each and every single step PRECISELY. Otherwise, you may ruin the entire system! Restart your system \u2013<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/7-11.png\" alt=\"\" width=\"893\" height=\"105\" \/><br \/>\nWhen the CentOS icon flashes, hit \u201ce\u201d key on keyboard for entering the grub edit mode.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/8-10.png\" alt=\"\" width=\"719\" height=\"399\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/9-9.png\" alt=\"\" width=\"717\" height=\"400\" \/><br \/>\nScroll down to the line that starts with \u201clinux\u201d or \u201clinux16\u201d \u2013<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/10-6.png\" alt=\"\" width=\"719\" height=\"388\" \/><br \/>\nNow, change the word \u201cro\u201d with the following line \u2013<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/11-6.png\" alt=\"\" width=\"720\" height=\"70\" \/><br \/>\nThen, press \u201cCtrl + X\u201d for booting with the configuration.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/12-6.png\" alt=\"\" width=\"722\" height=\"254\" \/><br \/>\nNow, we need to mount the system so that we can run all the commands as if we were inside the system. Enter the following command \u2013<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/13-6.png\" alt=\"\" width=\"721\" height=\"176\" \/><br \/>\nTime to perform the password change!<\/p>\n<p>The following step is an additional step. Apply this only if your system had SELinux enabled.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2019\/01\/14-6.png\" alt=\"\" width=\"720\" height=\"150\" \/><br \/>\nExit the edit mode \u2013<\/p>\n<p>Voila! Your system password is changed! Enjoy!<\/p>\n<p><a href=\"https:\/\/linuxhint.com\/centos_change_password\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Passwords are the oldest and yet, effective form of security measure that almost every single system in the world offers to protect privacy and user data. In the case of CentOS, it\u2019s more important to make sure that everything is secure with a powerful password. However, in cases, passwords need to be changed. There can &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/06\/centos-change-password-linux-hint\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;CentOS Change Password \u2013 Linux Hint&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7228","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7228","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=7228"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7228\/revisions"}],"predecessor-version":[{"id":7569,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7228\/revisions\/7569"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=7228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=7228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=7228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}