{"id":7679,"date":"2019-07-10T11:47:19","date_gmt":"2019-07-10T11:47:19","guid":{"rendered":"https:\/\/www.milesweb.in\/hosting-faqs\/?p=7679"},"modified":"2019-07-10T11:47:19","modified_gmt":"2019-07-10T11:47:19","slug":"change-password-in-linux","status":"publish","type":"post","link":"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/","title":{"rendered":"Discover the Steps to Change a Password in Linux"},"content":{"rendered":"<p>Passwords help to secure any system along with Linux. You may find Passwordless SSH as a trustworthy alternative, but at last a strong password is a great option to secure your system. A strong password only makes our system highly reliable. This tutorial will guide you on changing a password in Linux.<br \/>\nYou will also get to learn how to change it for other users on your VPS.<\/p>\n<h3>Passwords in Linux<\/h3>\n<p>Linux is globally considered to be one of the safest systems due to the way processes are handled. But, each of the operating system depends on the use of passwords at some point. Passwords are managed by Linux in a very similar way to other systems. However, you should know two important directories in password management.<\/p>\n<p>The first file is<strong> \/etc\/passwd<\/strong> where you will find all users on the system. Additionally, it displays which group of the system they are a part of. You might see many users, but only few will be able to log in as they are system users.<\/p>\n<p>For viewing the content of <strong>\/etc\/passwd<\/strong>, run the below command:<\/p>\n<pre class=\"lang:default decode:true\">cat \/etc\/passwd<\/pre>\n<p>The second Linux file is <strong>\/etc\/shadow<\/strong> that is strongly related to passwords. In this file, you will be able to see the users\u2019 encrypted passwords and also know if they have an SSH key.<\/p>\n<pre class=\"lang:default decode:true\">cat \/etc\/shadow<\/pre>\n<p>Finally, it is recommended that you should have strong passwords so that it becomes difficult to guess them, or brute-force them. But, in case you find that your password has been compromised, you can change it. Experts advice this to do frequently!<\/p>\n<h3>Command to Change a Password Linux<\/h3>\n<p>There is just one command required to change the <strong>unix<\/strong> password. Even if you are the regular user, first access your VPS through SSH. Then to change the password in Linux, open the terminal and type the following command:<\/p>\n<pre class=\"lang:default decode:true\">sudo passwd<\/pre>\n<p>After running the command, you will be asked to enter the new password twice. Here, you will be change the root password without specifying the user.<\/p>\n<h3>Commands to Change a Password in Linux for Another User<\/h3>\n<p>You can change the password for another user in the same system. For this, make sure you are logged in as a root user and add the user\u2019s name to the <strong>passwd<\/strong> command. You will be prompted by the same request to enter the new password twice. The command would look as below in the command line:<\/p>\n<pre class=\"lang:default decode:true\">passwd user_name<\/pre>\n<p>In this case you are changing the password of the user named john.<\/p>\n<pre class=\"lang:default decode:true\">passwd john<\/pre>\n<p>It\u2019s so simple! You have successfully updated the password.<\/p>\n<h3>Conclusion<\/h3>\n<p>It is important to change a password in Linux for the security of your project. The process is very simple, and so we recommend you to change the password frequently for maximum security.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Passwords help to secure any system along with Linux. You may find Passwordless SSH as a trustworthy alternative, but at last a strong password is a great option to secure your system. A strong password only makes our system highly reliable. This tutorial will guide you on changing a password in Linux. You will also [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[876,647,877],"class_list":["post-7679","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-vps-faq","tag-change-password-in-linux","tag-linux","tag-linux-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Learn to Change the PassWord in Linux for You and Another User<\/title>\n<meta name=\"description\" content=\"Passwords play a key role in securing your account. Here are the commands to change the password in Linux for you as well as another user.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn to Change the PassWord in Linux for You and Another User\" \/>\n<meta property=\"og:description\" content=\"Passwords play a key role in securing your account. Here are the commands to change the password in Linux for you as well as another user.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-10T11:47:19+00:00\" \/>\n<meta name=\"author\" content=\"Pallavi Godse\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pallavi Godse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/\"},\"author\":{\"name\":\"Pallavi Godse\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\"},\"headline\":\"Discover the Steps to Change a Password in Linux\",\"datePublished\":\"2019-07-10T11:47:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/\"},\"wordCount\":467,\"commentCount\":0,\"keywords\":[\"change password in linux\",\"Linux\",\"linux server\"],\"articleSection\":[\"VPS FAQ\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/\",\"name\":\"Learn to Change the PassWord in Linux for You and Another User\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\"},\"datePublished\":\"2019-07-10T11:47:19+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\"},\"description\":\"Passwords play a key role in securing your account. Here are the commands to change the password in Linux for you as well as another user.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Discover the Steps to Change a Password in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\",\"name\":\"Pallavi Godse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g\",\"caption\":\"Pallavi Godse\"},\"description\":\"Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.\",\"sameAs\":[\"https:\/\/www.milesweb.in\"],\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/author\/pallavi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn to Change the PassWord in Linux for You and Another User","description":"Passwords play a key role in securing your account. Here are the commands to change the password in Linux for you as well as another user.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"Learn to Change the PassWord in Linux for You and Another User","og_description":"Passwords play a key role in securing your account. Here are the commands to change the password in Linux for you as well as another user.","og_url":"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2019-07-10T11:47:19+00:00","author":"Pallavi Godse","twitter_misc":{"Written by":"Pallavi Godse","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/#article","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/"},"author":{"name":"Pallavi Godse","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945"},"headline":"Discover the Steps to Change a Password in Linux","datePublished":"2019-07-10T11:47:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/"},"wordCount":467,"commentCount":0,"keywords":["change password in linux","Linux","linux server"],"articleSection":["VPS FAQ"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/","name":"Learn to Change the PassWord in Linux for You and Another User","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website"},"datePublished":"2019-07-10T11:47:19+00:00","author":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945"},"description":"Passwords play a key role in securing your account. Here are the commands to change the password in Linux for you as well as another user.","breadcrumb":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/change-password-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.in\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"Discover the Steps to Change a Password in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.in\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945","name":"Pallavi Godse","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g","caption":"Pallavi Godse"},"description":"Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.","sameAs":["https:\/\/www.milesweb.in"],"url":"https:\/\/www.milesweb.in\/hosting-faqs\/author\/pallavi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/7679","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=7679"}],"version-history":[{"count":1,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/7679\/revisions"}],"predecessor-version":[{"id":7680,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/7679\/revisions\/7680"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=7679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=7679"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=7679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}