You are not logged in.

#1 2025-02-05 23:10:29

Kivan101
Member
Registered: 2025-02-05
Posts: 8

Password works in chrooted environment, but not after boot

Hey all, I'm having an odd difficulty with signing into my user after I reboot my system. I'll explain as best as I can:

From my arch-chrooted environment from the bootable USB, when I used passwd to change the password of the new account I created, I also wanted to test sudo out. I modified /etc/sudoers using visudo, I changed the password, and I tested it out by executing "sudo ls". That worked:

[testuser@archiso /]$ sudo ls
[sudo] password for testuser:
bin   boot   dev   etc   home   lib   . . .

However, when I reboot the system and attempt to login at the login prompt:

archlinuxbox login: testuser
Password:
Login incorrect

I've done this process about 5 times now. I've verified I've entered the password correctly every time, and now it's happened twice; Once on my Virtual Machine and now on my laptop (that I'm using as a test for installing Arch since I want to install Arch on my main system).

Those 2 installs were my first ever successful installs (after 5 weeks due to constant errors and being defeated. Not anymore! Almost...). I'm not sure where to start diagnosing and what I'm doing wrong. Any help is greatly appreciated.

Offline

#2 2025-02-05 23:26:32

mackin_cheese
Member
Registered: 2025-01-07
Posts: 274

Re: Password works in chrooted environment, but not after boot

post your /etc/passwd content

Offline

#3 2025-02-05 23:46:36

Kivan101
Member
Registered: 2025-02-05
Posts: 8

Re: Password works in chrooted environment, but not after boot

Sure thing. This is from the chrooted environment:

[root@archiso /]# cat /etc/passwd
root:x:0:0::/root:/usr/bin/bash
bin:x:1:1::/:/usr/bin/nologin
daemon:x:2:2::/:/usr/bin/nologin
mail:x:8:12::/var/spool/mail:/usr/bin/nologin
ftp:x:14:11::/srv/ftp:/usr/bin/nologin
http:x:33:33::/srv/http:/usr/bin/nologin
nobody:x:65534:65534:Kernel Overflow User:/:/usr/bin/nologin
dbus:x:81:81:System Message Bus:/:/usr/bin/nologin
systemd-coredump:x:980:980:systemd Core Dumper:/:/usr/bin/nologin
systemd-network:x:979:979:systemd Network Management:/:/usr/bin/nologin
systemd-oom:x:978:978:systemd Userspace OOM Killer:/:/usr/bin/nologin
systemd-journal-remote:x:977:977:systemd Journal Remote:/:/usr/bin/nologin
systemd-resolve:x:976:976:systemd Resolver:/:/usr/bin/nologin
systemd-timesync:x:975:975:systemd Time Synchronization:/:/usr/bin/nologin
tss:x:974:974:tss user for tpm2:/:/usr/bin/nologin
uuidd:x:68:68:uuid daemon:/:/usr/bin/nologin
alpm:x:973:973:Arch Linux Package Management:/:/usr/bin/nologin
testuser:x:1000:1000::/home/testuser:/bin/bash

EDIT: Quick thing to note, this passwd problem applies to both the root and the testuser account.

Last edited by Kivan101 (2025-02-05 23:48:10)

Offline

#4 2025-02-06 00:00:16

mackin_cheese
Member
Registered: 2025-01-07
Posts: 274

Re: Password works in chrooted environment, but not after boot

you're not chrooted in. both the accounts that you gave have @archiso listed at the end, which means you aren't chrooted in.


EDIT: i'm wrong, apologies

Last edited by mackin_cheese (2025-02-06 00:06:58)

Offline

#5 2025-02-06 00:02:12

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,453

Re: Password works in chrooted environment, but not after boot

No it doesn't, mackin_cheese.

Kivan101, are you using a different keymap from the default?

Online

#6 2025-02-06 00:03:42

Kivan101
Member
Registered: 2025-02-05
Posts: 8

Re: Password works in chrooted environment, but not after boot

I'm pretty sure I am... When I do an lsblk, it lists my EFI partition as /boot (which would be /mnt/boot in a non-chroot environment) and my filesystem as /. Is there something I'm missing?

Offline

#7 2025-02-06 00:05:40

mackin_cheese
Member
Registered: 2025-01-07
Posts: 274

Re: Password works in chrooted environment, but not after boot

oh sorry @scimmia

Offline

#8 2025-02-06 00:06:43

Kivan101
Member
Registered: 2025-02-05
Posts: 8

Re: Password works in chrooted environment, but not after boot

> Kivan101, are you using a different keymap from the default?

I'm pretty sure I'm not, but I think I executed the commands to set my keymap in the non-chrooted environment. Let me set my keymap to de-latin1 (what the installation guide recommended), set the password again, then try again. I'll let you know.

EDIT: Just realized that's the German keyboard. I didn't do that during installation, but I won't be setting my keymaps to de-latin1. LOL

Last edited by Kivan101 (2025-02-06 00:07:55)

Offline

#9 2025-02-06 00:09:40

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,453

Re: Password works in chrooted environment, but not after boot

What installation guide recommended that?

Online

#10 2025-02-06 00:11:03

Kivan101
Member
Registered: 2025-02-05
Posts: 8

Re: Password works in chrooted environment, but not after boot

Well... Turns out I did later on in the install inside /etc/vconsole.conf. Let me set it to en_US.UTF8 and see how

Offline

#11 2025-02-06 00:11:49

Kivan101
Member
Registered: 2025-02-05
Posts: 8

Re: Password works in chrooted environment, but not after boot

Scimmia wrote:

What installation guide recommended that?

https://wiki.archlinux.org/title/Installation_guide

That's my bad, I forgot to read the line that says "German keyboard".

Offline

#12 2025-02-06 00:20:30

Kivan101
Member
Registered: 2025-02-05
Posts: 8

Re: Password works in chrooted environment, but not after boot

That fixed it. Thank you for the help Scimmia! Give me 5 minutes to make a detailed explanation of what I fixed for documentation purposes before I close this issue

Offline

#13 2025-02-06 00:23:21

Kivan101
Member
Registered: 2025-02-05
Posts: 8

Re: Password works in chrooted environment, but not after boot

[SOLVED] Password works in chrooted environment, but not after boot

The problem wasn't necessarily to do with the /etc/passwd file, but for how my keyboard worked. What I suspect happened is that I set the console to the correct keymapping, however when I rebooted the system into live, it initiated a virtual console (hence /etc/vconsole.conf having the german keyboard layout) with the German keyboard which isn't the same as a US keyboard. Once I fixed the keyboard inside vconsole.conf and rebooted, I logged in flawlessly.

TLDR: Read documentation carefully. Turns out, you can make simple mistakes from it. smile

Last edited by Kivan101 (2025-02-06 00:25:34)

Offline

#14 2025-02-06 06:05:17

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,218

Re: Password works in chrooted environment, but not after boot

Hi Kivan, you should edit the title of this thread and append [Solved].  You can also edit the first post and enter in the fix.  smile Welcome to the forums btw

Offline

Board footer

Powered by FluxBB