1

Has anyone run into the issue of not being able to log into their root account after a fresh install of Arch Linux? I have tried setting the root password twice with the passwd command within the chroot environment and even tried a complete reinstall but it doesn’t seem to work. When I reboot the vm and remove the iso file I get the arch log on screen but if I type root and my password I get a “Login incorrect” error. I’ve been googling around for this issue but everything tells me to follow these instructions https://wiki.archlinux.org/index.php/Reset_root_password[1] but they don’t seem to do anything for me.

I tried reinstalling again and made sure I followed the instructions exactly (from the Arch wiki) and I still have the same issue. I also tried making a different user account since I read somewhere that sometimes you are unable to log on as root if certain settings are present but I am not able to log in to that one either. I have tried a couple times to reset the password by booting from the iso and performing the following steps as described in the article above.

  • Mounting my root partition with mount /dev/sda1 /mnt
  • Entering the chroot session with arch-chroot /mnt /bin/bash
  • Executing passwd both on my user account and the root user
  • Exit the chroot session with exit
  • Reboot the vm and eject the iso

but that doesn't seem to do anything. I don't get any error messages when I run the passwd command. I can't find much online about this issue other than a few posts which aren't applicable to me so I have no idea what to do next. So far I have checked to make sure I have the correct keymappings and that I am actually executing passwd from within the chroot session.

If it matters I am trying to install the latest arch version on virtual box running on OS X 10.11. Any suggestions for what to do would be greatly appreciated.

Edit: Additional info

I configured using a ext4 partition and I have made no modifications to the PAM

8
  • I'd start by checking that your root partition is not mounted read-only and that it's not a tmpfs partition. Then check that your shadow file is writeable by root. Next, when you run passwd try setting a strong password for it in case cracklib doesn't like it and is silently failing. Also, if you made any changes to PAM please post them.
    – vik
    Jan 26, 2016 at 0:11
  • It is an ext4 partition. How would I check if my root partition is mounted in read-only mode? And how would I check the shadow file? Is this done from within the chroot session using the ISO? And I didn't make any changes to PAM but I will look into using a stronger password and seeing if it still fails. If it were failing though wouldn't it just not be setting a password? Meaning that the password would be blank? Cause I also tried that and that doesn't work either. Jan 26, 2016 at 0:26
  • Try editing your /etc/shadow file in the chroot: make a backup of your shadow, then find the root user and remove the password part between the colons; it should be a very long string. Leave all of the colons intact. This should enable you to login to the root account without a password. Then you can login and we can see if something's wrong with your arch install.
    – vik
    Jan 26, 2016 at 1:36
  • Have you tried booting your Arch install logging in as root, then typing enter for the password?
    – vik
    Jan 26, 2016 at 1:57
  • 1
    You could, but if you can't get root working another user account probably won't help. I know this seems redundant, but are you sure you're booting your ext4 partition in the VM and not the ISO? It sounds like you're changing the password in the installer environment (which isn't saved on reboot) not the ext4 partition.
    – vik
    Jan 26, 2016 at 10:09

1 Answer 1

1

I have also faced this problem. In my case during the installation I temporarily changed the keyboard layout using the command loadkeys (instead of US as default). I changed the root's password successfully but I couldn't login later on and It took me a while to understand that the problem was that the keyboard layout in the login process was US again.

  1. If the keyboard layout is changed permanently (See vconsole.conf) during the installation, this problem will not occur because the keyboard layout will be permanent.
  2. You can also login as root typing the password having in mind the US keyboard layout to avoid rebooting.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .