{"id":5590,"date":"2024-01-11T17:37:35","date_gmt":"2024-01-11T23:37:35","guid":{"rendered":"https:\/\/www.incredigeek.com\/home\/?p=5590"},"modified":"2024-01-11T17:37:35","modified_gmt":"2024-01-11T23:37:35","slug":"cant-log-into-nixos-after-install","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/cant-log-into-nixos-after-install\/","title":{"rendered":"Can&#8217;t log into NixOS after Install!"},"content":{"rendered":"\n<p>You thought everything went well with your NixOS install, you reboot, enter your username and password, and bam!  Login incorrect.<\/p>\n\n\n\n<p>Okay, try it again.<\/p>\n\n\n\n<p>Login incorrect<\/p>\n\n\n\n<p>Hmm&#8230;  <\/p>\n\n\n\n<p>Let&#8217;s try root.  Nope, same thing&#8230;<\/p>\n\n\n\n<p>If you don&#8217;t enter the password in correctly for root at the end of an installation, there will not be a root password, hence you can not log in.<\/p>\n\n\n\n<p>Best way to keep this from happening is to make sure the password is set up before rebooting.<\/p>\n\n\n\n<p>If you are one of those unfortunate souls who entered the wrong root password and missed the warning at the end of the installation<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2024\/01\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"133\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2024\/01\/image-1024x133.png\" alt=\"\" class=\"wp-image-5591\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2024\/01\/image-1024x133.png 1024w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2024\/01\/image-300x39.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2024\/01\/image-768x100.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2024\/01\/image-500x65.png 500w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2024\/01\/image.png 1262w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Try the following.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nixos-enter --root '\/mnt'<\/pre>\n\n\n\n<p>Note: If you already rebooted, boot up on the minimum USB drive, mount the root partition, then run the nixos-enter command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mount \/dev\/disk\/by-label\/nixos \/mnt\nnixos-enter --root '\/mnt'<\/pre>\n\n\n\n<p>passwd to set the root password.  You can also set your user password with <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">passwd username<\/pre>\n\n\n\n<p>Change username to your username.<\/p>\n\n\n\n<p>Reboot and login!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You thought everything went well with your NixOS install, you reboot, enter your username and password, and bam! Login incorrect. Okay, try it again. Login incorrect Hmm&#8230; Let&#8217;s try root. Nope, same thing&#8230; If you don&#8217;t enter the password in &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/cant-log-into-nixos-after-install\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[7,1635,324,200,1636,550],"class_list":["post-5590","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux-2","tag-nixos","tag-passwd","tag-password","tag-root","tag-user"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=5590"}],"version-history":[{"count":1,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5590\/revisions"}],"predecessor-version":[{"id":5592,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5590\/revisions\/5592"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=5590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=5590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=5590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}