{"id":7185,"date":"2022-04-28T11:01:11","date_gmt":"2022-04-28T09:01:11","guid":{"rendered":"https:\/\/raspberrytips.com\/?p=7185"},"modified":"2025-10-17T23:02:22","modified_gmt":"2025-10-17T21:02:22","slug":"change-password-raspberry-pi","status":"publish","type":"post","link":"https:\/\/raspberrytips.com\/change-password-raspberry-pi\/","title":{"rendered":"How to Change Password on Raspberry Pi OS (Complete Guide)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Until recently, all Raspberry Pi OS systems were installed with the same user and password (pi \/ raspberry). This is very convenient when you install it, but it can lead to security issues. Also, you may want to change your password regularly for security reasons. Here is how to do this.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>On Raspberry Pi OS with Desktop, the password can be changed via the Raspberry Pi configuration tool, under Preferences in the main menu. On Raspberry Pi OS Lite or SSH, use the command &#8220;passwd&#8221;.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For more information, keep reading. I&#8217;ll explain the step-by-step process to change your password in each case. I&#8217;ll also provide a guide on what to do if you have lost your password.<\/p>\n\n\n<style>.kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-table-of-content-wrap{padding-top:var(--global-kb-spacing-sm, 1.5rem);padding-right:var(--global-kb-spacing-sm, 1.5rem);padding-bottom:var(--global-kb-spacing-sm, 1.5rem);padding-left:var(--global-kb-spacing-sm, 1.5rem);background-color:var(--global-palette7, #EDF2F7);box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}.kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-table-of-contents-title-wrap{padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-table-of-contents-title{font-weight:regular;font-style:normal;}.kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-table-of-content-wrap .kb-table-of-content-list{font-size:var(--global-kb-font-size-sm, 0.9rem);font-weight:regular;font-style:normal;margin-top:var(--global-kb-spacing-sm, 1.5rem);margin-right:0px;margin-bottom:0px;margin-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-toggle-icon-style-basiccircle .kb-table-of-contents-icon-trigger:after, .kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-toggle-icon-style-basiccircle .kb-table-of-contents-icon-trigger:before, .kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-toggle-icon-style-arrowcircle .kb-table-of-contents-icon-trigger:after, .kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-toggle-icon-style-arrowcircle .kb-table-of-contents-icon-trigger:before, .kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-toggle-icon-style-xclosecircle .kb-table-of-contents-icon-trigger:after, .kb-table-of-content-nav.kb-table-of-content-id19563_c031ec-35 .kb-toggle-icon-style-xclosecircle .kb-table-of-contents-icon-trigger:before{background-color:var(--global-palette7, #EDF2F7);}<\/style>\n\n<p class='ml_begpost' id='ml_begpost_commands'>If you&#8217;re new to Raspberry Pi or Linux, I\u2019ve got something that can help you right away! <br \/><a rel='noopener' href='https:\/\/raspberrytips.com\/downloads\/?source=begpost&#038;lm=4' target='_blank'>Download my free Linux commands cheat sheet<\/a> \u2013 it\u2019s a quick reference guide with all the essential commands you\u2019ll need to get things done on your Raspberry Pi. <a rel='noopener' href='https:\/\/raspberrytips.com\/downloads\/?source=begpost&#038;lm=4' target='_blank'><b>Click here to get it for free!<\/b><\/a><\/p>\n\n\n<h2 class=\"wp-block-heading\">Set the New Password on Raspberry Pi OS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">From 2012 to 2022, all Raspberry Pi models were pre-installed <a href=\"https:\/\/raspberrytips.com\/ssh-password-raspberry-pi\/\" data-type=\"post\" data-id=\"145\">with the same username and password<\/a>: <em>pi<\/em> \/ <em>raspberry<\/em>. Since April 2022, using a different username and password is now required on the first boot.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Welcome Wizard on First Boot<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you are using <a href=\"https:\/\/raspberrytips.com\/raspberry-pi-os-versions\/\" data-type=\"post\" data-id=\"13288\">the latest Raspberry Pi OS version<\/a>, you&#8217;ll get that kind of assistant showing up on your first boot:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"433\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/welcome-wizard-new.jpg\" alt=\"\" class=\"wp-image-11249\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/welcome-wizard-new.jpg 833w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/welcome-wizard-new-300x156.jpg 300w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/welcome-wizard-new-768x399.jpg 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">After setting up your local settings, essentially your keyboard layout, you&#8217;ll get a new screen where you can create the first user:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"802\" height=\"383\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/create-user-first-boot.jpg\" alt=\"\" class=\"wp-image-11250\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/create-user-first-boot.jpg 802w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/create-user-first-boot-300x143.jpg 300w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/create-user-first-boot-768x367.jpg 768w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">You&#8217;ll get something similar when you first start on Raspberry Pi OS Lite (without a desktop environment).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So basically, you can no longer avoid setting up a new username and password when you <a href=\"https:\/\/raspberrytips.com\/install-raspbian-raspberry-pi\/\" data-type=\"post\" data-id=\"587\">install Raspberry Pi OS<\/a>. But if you want to change it later, or are using an older version of Raspberry Pi OS, I&#8217;ll explain how to change your password in the next parts.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Using Raspberry Pi Imager<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Another option if you want to skip this welcome assistant, is to <a href=\"https:\/\/raspberrytips.com\/raspberry-pi-imager-guide\/\" data-type=\"post\" data-id=\"11264\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"3275\">use Raspberry Pi Imager<\/a>, and especially the advanced settings, to set the new user and password directly on the SD card when you flash the new operating system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A special menu will appear after you click <strong>Next<\/strong>, asking if you would like to <strong>apply OS customisation settings<\/strong>. Click <strong>Edit Settings<\/strong>: <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1356\" height=\"746\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2025\/07\/customisations.jpg\" alt=\"\" class=\"wp-image-41590\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2025\/07\/customisations.jpg 1356w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2025\/07\/customisations-300x165.jpg 300w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2025\/07\/customisations-1024x563.jpg 1024w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2025\/07\/customisations-768x423.jpg 768w\" sizes=\"auto, (max-width: 1356px) 100vw, 1356px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Then fill the form with at least the username, password and locale settings.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"443\" height=\"189\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/imager-set-password.jpg\" alt=\"\" class=\"wp-image-11252\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/imager-set-password.jpg 443w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/imager-set-password-300x128.jpg 300w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Hit <strong>Save<\/strong>, <strong>Yes<\/strong>, and confirm it again to apply these settings to your image.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After using this, your system should skip the first boot wizard, and send you directly into your new desktop environment. This is particularly useful if you&#8217;re <a href=\"https:\/\/raspberrytips.com\/raspberry-pi-headless-setup\/\">installing a headless system<\/a> (no monitor), but let&#8217;s get back to your original question.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note that even if you lose this password, there are a few ways to <a href=\"https:\/\/raspberrytips.com\/forgot-raspberry-pi-password\/\" target=\"_blank\" rel=\"noreferrer noopener\">reset a forgotten password on a Raspberry Pi<\/a>. Click on the link to learn more about this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Change Password on Raspberry Pi OS with Desktop<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re on Raspberry Pi OS with Desktop, it should be pretty easy to change the password. I have included screenshots with the step-by-step guide below to help you with this procedure. <br>By the way, you absolutely need access to a session on Raspberry Pi OS to do this. <strong>If you have lost your password, check the last part of this tutorial before getting started below.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Welcome Wizard<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before going further, I want to remind you that <strong>the welcome wizard on Raspberry Pi OS is a pretty neat tool that allows you to change many things, including the password for the &#8220;pi&#8221; user.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s almost the first question it will ask you:<br><img loading=\"lazy\" decoding=\"async\" width=\"509\" height=\"335\" class=\"wp-image-7189\" style=\"width: 509px;\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2021\/03\/welcome-wizard-password.jpg\" alt=\"\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2021\/03\/welcome-wizard-password.jpg 509w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2021\/03\/welcome-wizard-password-300x197.jpg 300w\" sizes=\"auto, (max-width: 509px) 100vw, 509px\" \/><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>If you are just installing your system, this is the easiest way to change your password. <\/strong>Follow this wizard, set a password, and configure the basic settings.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Raspberry Pi Configuration Tool<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">There is a good chance you are here because you changed your password during the first boot, haven&#8217;t used your password since as the session opens without a password, and don&#8217;t remember what password you set.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>No worries, you can change your password easily by following these few steps:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the <strong>main menu<\/strong> in the top left of your screen.<\/li>\n\n\n\n<li>Navigate to <strong>Preferences <\/strong>and click <strong>Control Centre<\/strong>.<br><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"243\" class=\"wp-image-44919\" style=\"width: 600px;\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2024\/09\/trixie_control_centre.jpg\" alt=\"\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2024\/09\/trixie_control_centre.jpg 1135w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2024\/09\/trixie_control_centre-300x122.jpg 300w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2024\/09\/trixie_control_centre-1024x415.jpg 1024w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2024\/09\/trixie_control_centre-768x311.jpg 768w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/li>\n\n\n\n<li>A window will appear with many settings you can tweak.<br>Scroll down to the <strong>System<\/strong> tab, and click <strong>Change Password<\/strong>&#8230;:<br><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"301\" class=\"wp-image-44941\" style=\"width: 600px;\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/trixie_desktop_change_pw.jpg\" alt=\"\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/trixie_desktop_change_pw.jpg 730w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/trixie_desktop_change_pw-300x150.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/li>\n\n\n\n<li>Then you can change your password directly:<br><img loading=\"lazy\" decoding=\"async\" width=\"352\" height=\"174\" class=\"wp-image-7194\" style=\"width: 352px;\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2021\/03\/change-password.jpg\" alt=\"\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2021\/03\/change-password.jpg 352w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2021\/03\/change-password-300x148.jpg 300w\" sizes=\"auto, (max-width: 352px) 100vw, 352px\" \/><br><strong>Choose a new password and enter it twice.<br><\/strong>If you are doing this for security reasons, I highly recommend using a long password (no need for multiple special characters, but long passwords are better).<br>For example, I often use <a data-lasso-id=\"3276\" href=\"https:\/\/webinpact.com\/password-generator\/\" target=\"_blank\" rel=\"noopener\">that kind of tool that generates long passwords<\/a> that are easy to remember.<\/li>\n\n\n\n<li>Once done, Raspberry Pi OS will display a success message:<br><img loading=\"lazy\" decoding=\"async\" width=\"345\" height=\"109\" class=\"wp-image-7193\" style=\"width: 345px;\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2021\/03\/password-changed.jpg\" alt=\"\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2021\/03\/password-changed.jpg 345w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2021\/03\/password-changed-300x95.jpg 300w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s it! You&#8217;ve changed your password, and can proceed with whatever you were trying to do :).<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">By the way, if you are just getting started on Raspberry Pi, I can help you to learn much faster. <a rel=\"noopener\" href=\"https:\/\/raspberrytips.com\/course-end\" target=\"_blank\" data-lasso-id=\"3277\">My Raspberry Pi boot camp course<\/a> helps you discover the Raspberry Pi device and unlock its secrets step-by-step. In a few hours, you&#8217;ll be ready to start any fantastic project you are interested in.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Change Password on Raspberry Pi OS Lite (or via SSH)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you just have access to a terminal, via Raspberry Pi OS Lite or remote SSH access, you can&#8217;t use the previous desktop tools.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But don&#8217;t worry, there&#8217;s still a way to change your password via command line. It&#8217;s not very complicated, as there&#8217;s only one command to remember (and you have multiple choices).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">raspi-config<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s not the fastest method, but it&#8217;s definitely the easiest to remember.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Raspi-config is a great tool available on Raspberry Pi OS to configure most settings on your system. It includes a function to change your password, which is what we&#8217;ll use in this section:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Open a terminal<\/strong>, connect via SSH or log in on Raspberry Pi OS Lite.<\/li>\n\n\n\n<li><strong>Launch raspi-config:<\/strong><br><code>sudo raspi-config<\/code><br>Your current password might be required to go further. If you have lost it, check the last part of this guide.<\/li>\n\n\n\n<li>Go to <strong>System Options<\/strong>.<br><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"264\" class=\"wp-image-25164\" style=\"\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/raspi-config-sys-options.jpg\" alt=\"\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/raspi-config-sys-options.jpg 729w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/raspi-config-sys-options-300x109.jpg 300w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><\/li>\n\n\n\n<li>Then select <strong>Password<\/strong>.<br><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"261\" class=\"wp-image-25165\" style=\"\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/raspi-config-password.jpg\" alt=\"\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/raspi-config-password.jpg 729w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/raspi-config-password-300x107.jpg 300w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><\/li>\n\n\n\n<li>Confirm by pressing ENTER.<\/li>\n\n\n\n<li>Type your new password twice.<br><img loading=\"lazy\" decoding=\"async\" width=\"473\" height=\"108\" class=\"wp-image-25166\" style=\"\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/raspi-config-password-updated.jpg\" alt=\"\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/raspi-config-password-updated.jpg 473w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2022\/04\/raspi-config-password-updated-300x68.jpg 300w\" sizes=\"auto, (max-width: 473px) 100vw, 473px\" \/><\/li>\n\n\n\n<li>That&#8217;s it, you should get a confirmation message now.<\/li>\n\n\n\n<li>You can exit raspi-config with ESC.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>So, Raspi-config is pretty convenient to remember, but as I told you there&#8217;s a faster solution.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The passwd Command<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Raspi-config is just a nice interface, running many Linux commands in the background. If you remember this easy command, you can go directly to the last step.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The Linux command to change a password on Raspberry Pi is:<br><\/strong><code>passwd<\/code><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"610\" height=\"149\" src=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2024\/03\/pass-update.jpg\" alt=\"\" class=\"wp-image-25167\" srcset=\"https:\/\/raspberrytips.com\/wp-content\/uploads\/2024\/03\/pass-update.jpg 610w, https:\/\/raspberrytips.com\/wp-content\/uploads\/2024\/03\/pass-update-300x73.jpg 300w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The good news is that this solution will work on any Linux distribution, even if you are not on Raspberry Pi OS.<\/p>\n\n\n\r\n\t\t<!-- wp:paragraph -->\r\n\t<p  id=\"inpost_lm_linux_commands\"><b>Tip: <\/b> Command lines can be a pain to memorize. I put the essential Linux commands on a printable cheat sheet so you don't have to keep googling them.\u00a0You can <a rel=\"noreferrer noopener\" href=\"https:\/\/raspberrytips.com\/downloads\/?source=rb_linux&lm=4\" target=\"_blank\">grab the PDF here<\/a> if you want to save some time.<\/p>\r\n\t<!-- \/wp:paragraph -->\r\n\t\t\n\n\n<h2 class=\"wp-block-heading\">Recover Access if You&#8217;ve Lost Your Password<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ve discussed how to change your password if you still have access to the user session. But can you do the same if you have lost the password?<br>Yes, in fact, there are several solutions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ll give you two quick solutions, but you can find out more details here if needed: <br><a href=\"https:\/\/raspberrytips.com\/forgot-raspberry-pi-password\/\" data-type=\"post\" data-id=\"12001\">5 Easy Ways to Reset a Forgotten Password on Raspberry Pi<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Use Another User<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The easiest way is to log in with another administrator user. <\/strong>If you followed my guide on <a href=\"https:\/\/raspberrytips.com\/new-user-on-raspberry-pi\/\" data-type=\"post\" data-id=\"3322\" data-lasso-id=\"3278\">how to create a new user on Raspberry Pi<\/a>, you can use it to reset the password of another user.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You need the sudo privileges to do this.<br>The command to change the user password from another session is:<br><code>sudo passwd &lt;user&gt;<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, for example:<br><code>sudo passwd pat<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are logged in with another user, you can change it directly and recover access to this session.<br>Another option could be to <a rel=\"noopener\" href=\"https:\/\/raspberrytips.com\/change-raspberry-pi-username\/\" data-type=\"post\" data-id=\"7071\" target=\"_blank\" data-lasso-id=\"3279\">change the default username on your Raspberry Pi<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Log In With Root<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A similar way is to use the root user directly.<\/strong><br>If you have allowed it to access SSH, you can follow the same steps as with another user (you just don&#8217;t need sudo).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What you can also do, is removing the password requirement on another session. Here is the command to do this:<br><code>sudo passwd &lt;user&gt; -d<\/code><br>Once done, you can open a session with this user without any password, and change it following the first part of this tutorial.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As reminder, here is <a rel=\"noopener\" href=\"https:\/\/raspberrytips.com\/login-as-root\/\" data-type=\"post\" data-id=\"1124\" target=\"_blank\" data-lasso-id=\"3280\">how to log in as<\/a><a href=\"https:\/\/raspberrytips.com\/login-as-root\/\" data-type=\"post\" data-id=\"1124\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"3281\"> <\/a><a rel=\"noopener\" href=\"https:\/\/raspberrytips.com\/login-as-root\/\" data-type=\"post\" data-id=\"1124\" target=\"_blank\" data-lasso-id=\"3282\">root on Raspberry Pi<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unfortunately, there is no other way. As the root user is not enabled by default, you can&#8217;t start in single user mode or anything like that, which I use on Linux from time to time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another thing you might want to look into if nothing works is <a href=\"https:\/\/raspberrytips.com\/remove-password-on-raspberry-pi\/\" data-type=\"post\" data-id=\"19205\">how to remove the password completely<\/a> (click the link to read my tips on this).<\/p>\n\n\n<section id=\"end-block-pi\">\r\n<div class=\"rt-community-card \">\r\n\t<div class=\"rt-community-card__inner\">\r\n\r\n\t\t<div class=\"rt-community-card__main\">\r\n\t\t\t<h3 class=\"rt-community-card__headline\">\r\n\t\t\t\tNot getting the same result?\t\t\t<\/h3>\r\n\r\n\t\t\t<p class=\"rt-community-card__description\">\r\n\t\t\t\tEven when you follow every step, small differences in OS version, hardware or config can change the outcome. Instead of wasting time guessing, get help from people who have already fixed the same kind of issue.\t\t\t<\/p>\r\n\r\n\t\t\t<div class=\"rt-community-card__actions\">\r\n\t\t\t\t<a class=\"rt-community-card__button\" href=\"https:\/\/raspberrytips.com\/school\/community\/?coupon=EBCTY\">\r\n\t\t\t\t\t<span>Ask your question now<\/span>\r\n\t\t\t\t\t<span class=\"rt-community-card__button-arrow\">\u2192<\/span>\r\n\t\t\t\t<\/a>\r\n\r\n\t\t\t\t\t\t\t\t\t<div class=\"rt-community-card__small\">\r\n\t\t\t\t\t\t<span class=\"rt-community-card__small-lock\">\ud83d\udd12<\/span>\r\n\t\t\t\t\t\tNo risk. Cancel anytime.\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t<\/div>\r\n\r\n\t\t\t\t\t<div class=\"rt-community-card__side\">\r\n\t\t\t\t<ul class=\"rt-community-card__benefits\">\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Get help on your exact issue<\/li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Access step-by-step videos for tricky setups<\/li>\r\n\t\t\t\t\t\t\t\t\t\t\t<li>Browse the website without ads<\/li>\r\n\t\t\t\t\t\t\t\t\t<\/ul>\r\n\t\t\t<\/div>\r\n\t\t\r\n\t<\/div>\r\n<\/div>\r\n<\/section>\r\n\r\n<style>\r\n.rt-community-card {\r\n\t--rt-bg: #f7f7f9;\r\n\t--rt-border: #e4e4e8;\r\n\t--rt-text: #15171b;\r\n\t--rt-muted: #5b6270;\r\n\t--rt-accent: #C61E4A;\r\n\t--rt-accent-hover: #aa183f;\r\n\t--rt-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);\r\n\r\n\tmargin: 36px 0;\r\n\tcolor: var(--rt-text);\r\n\tfont-family: inherit;\r\n}\r\n\r\n.rt-community-card__inner {\r\n\tdisplay: grid;\r\n\tgrid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.95fr);\r\n\tgap: 34px;\r\n\talign-items: start;\r\n\tbackground: var(--rt-bg);\r\n\tborder: 1px solid var(--rt-border);\r\n\tborder-radius: 22px;\r\n\tpadding: 34px 36px;\r\n\tbox-shadow: var(--rt-shadow);\r\n}\r\n\r\n.rt-community-card__main {\r\n\tmin-width: 0;\r\n}\r\n\r\n.rt-community-card__side {\r\n\tborder-left: 1px solid #e1e1e6;\r\n\tpadding-left: 28px;\r\n}\r\n\r\n.rt-community-card__benefits {\r\n\tmargin: 6px 0 0;\r\n\tpadding: 0;\r\n\tlist-style: none;\r\n\tdisplay: grid;\r\n\tgap: 18px;\r\n}\r\n\r\n.rt-community-card__benefits li {\r\n\tposition: relative;\r\n\tpadding-left: 18px;\r\n\tfont-size: 18px;\r\n\tline-height: 1.55;\r\n\tcolor: var(--rt-text);\r\n}\r\n\r\n.rt-community-card__benefits li::before {\r\n\tcontent: \"\";\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0.72em;\r\n\twidth: 7px;\r\n\theight: 7px;\r\n\tborder-radius: 999px;\r\n\tbackground: var(--rt-accent);\r\n\ttransform: translateY(-50%);\r\n}\r\n\r\n.rt-community-card__actions {\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n\talign-items: flex-start;\r\n\tgap: 10px;\r\n\tmargin-top: 30px;\r\n}\r\n\r\n.rt-community-card__button {\r\n\tdisplay: inline-flex;\r\n\talign-items: center;\r\n\tjustify-content: center;\r\n\tgap: 10px;\r\n\tmin-height: 60px;\r\n\tpadding: 0 28px;\r\n\tborder-radius: 14px;\r\n\tbackground: var(--rt-accent);\r\n\tcolor: #fff !important;\r\n\ttext-decoration: none !important;\r\n\tfont-size: 21px;\r\n\tfont-weight: 700;\r\n\tline-height: 1;\r\n\tbox-shadow: 0 12px 22px rgba(198, 30, 74, 0.22);\r\n\ttransition: background .2s ease, transform .2s ease, box-shadow .2s ease;\r\n}\r\n\r\n.rt-community-card__button:hover {\r\n\tbackground: var(--rt-accent-hover);\r\n\tcolor: #fff !important;\r\n\ttransform: translateY(-1px);\r\n\tbox-shadow: 0 14px 26px rgba(198, 30, 74, 0.28);\r\n}\r\n\r\n.rt-community-card__button-arrow {\r\n\tfont-size: 20px;\r\n\tline-height: 1;\r\n}\r\n\r\n.rt-community-card__small {\r\n\tfont-size: 15px;\r\n\tline-height: 1.5;\r\n\tcolor: #6a717d;\r\n\tpadding-left: 2px;\r\n}\r\n\r\n.rt-community-card__small-lock {\r\n\tmargin-right: 6px;\r\n\tfont-size: 14px;\r\n\tvertical-align: baseline;\r\n}\r\n\r\n\/* Tablet *\/\r\n@media (max-width: 900px) {\r\n\t.rt-community-card {\r\n\t\tmargin: 28px 0;\r\n\t}\r\n\r\n\t.rt-community-card__inner {\r\n\t\tgrid-template-columns: 1fr;\r\n\t\tgap: 24px;\r\n\t\tpadding: 28px 24px;\r\n\t}\r\n\r\n\t.rt-community-card__side {\r\n\t\tborder-left: 0;\r\n\t\tborder-top: 1px solid #e1e1e6;\r\n\t\tpadding-left: 0;\r\n\t\tpadding-top: 22px;\r\n\t}\r\n\r\n\t.rt-community-card__benefits {\r\n\t\tgrid-template-columns: 1fr;\r\n\t\tgap: 12px;\r\n\t}\r\n}\r\n\r\n\/* Mobile *\/\r\n@media (max-width: 640px) {\r\n\t.rt-community-card__inner {\r\n\t\tpadding: 22px 18px;\r\n\t\tborder-radius: 18px;\r\n\t\tgap: 20px;\r\n\t}\r\n\t\r\n\t.rt-community-card__side {\r\n\t\tpadding-top: 18px;\r\n\t}\r\n\r\n\t.rt-community-card__benefits li {\r\n\t\tfont-size: 16px;\r\n\t}\r\n\r\n\t.rt-community-card__actions {\r\n\t\tmargin-top: 24px;\r\n\t\talign-items: stretch;\r\n\t}\r\n\r\n\t.rt-community-card__button {\r\n\t\twidth: 100%;\r\n\t\tmin-height: 56px;\r\n\t\tfont-size: 18px;\r\n\t\tpadding: 0 20px;\r\n\t}\r\n\r\n\t.rt-community-card__small {\r\n\t\ttext-align: center;\r\n\t\tpadding-left: 0;\r\n\t}\r\n}\r\n<\/style>\r\n\t\r\n","protected":false},"excerpt":{"rendered":"<p>Until recently, all Raspberry Pi OS systems were installed with the same user and password (pi \/ raspberry). This is very convenient when you install it, but it can lead to security issues. Also, you may want to change your password regularly for security reasons. Here is how to do this. On Raspberry Pi OS&#8230;<\/p>\n","protected":false},"author":1,"featured_media":7208,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-7185","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to-tutorials"],"taxonomy_info":{"category":[{"value":2,"label":"How-To Tutorials"}]},"featured_image_src_large":["https:\/\/raspberrytips.com\/wp-content\/uploads\/2021\/03\/change-password-raspberry-pi-1024x683.jpg",1024,683,true],"author_info":{"display_name":"Patrick Fromaget","author_link":"https:\/\/raspberrytips.com\/author\/admin\/"},"comment_info":0,"category_info":[{"term_id":2,"name":"How-To Tutorials","slug":"how-to-tutorials","term_group":0,"term_taxonomy_id":2,"taxonomy":"category","description":"","parent":0,"count":228,"filter":"raw","cat_ID":2,"category_count":228,"category_description":"","cat_name":"How-To Tutorials","category_nicename":"how-to-tutorials","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/posts\/7185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/comments?post=7185"}],"version-history":[{"count":20,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/posts\/7185\/revisions"}],"predecessor-version":[{"id":44942,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/posts\/7185\/revisions\/44942"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/media\/7208"}],"wp:attachment":[{"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/media?parent=7185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/categories?post=7185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/raspberrytips.com\/wp-json\/wp\/v2\/tags?post=7185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}