You are not logged in.

#1 2020-10-28 12:57:34

ThL117
Member
Registered: 2020-10-28
Posts: 7

[SOLVED] Can't login as root on linux VT.

Hello everyone.
Trying to install Arch. Just to be clear, it is not first time I Install Arch. And my installation process diverges slightly from installation guide since I try to install it on ZFS on LUKS.
At this point, as I expected, it fails to boot. But what is much more annoying is that it fails to let me into emergency shell (Says root account/password is locked, can't recall exact message).
Okay then, I've rebooted back into Gentoo and started systemd-nspawn instance with this Arch installation, like this:

# mkdir /mnt/arch
# mount -t zfs zpool0/system/arch /mnt/arch
# systemd-nspawn -b -D /mnt/arch -M arch

It boots, and I can log in as user (l117), but not as root. It prints "Login incorrect".
Sure I tried:
To set root password:

# chroot /mnt/arch /sbin/passwd
New password:
Retype new password:
passwd: password updated successfully

To get status of root account:

# chroot /mnt/arch /sbin/passwd -S
root P 10/28/2020 -1 -1 -1 -1

To unlock root account:

# chroot /mnt/arch /sbin/passwd -u root
passwd: password expiry information changed.

passwd and shadow look good to me:

# chroot /mnt/arch /sbin/head -n1 /etc/passwd
root:x:0:0::/root:/bin/bash
# chroot /mnt/arch /sbin/head -n1 /etc/shadow
root:$6$fBrc82KMdDcfWvB/$ak6PAOasDko0DYOkjhPCs4ktKno8aXxMX4uBf9iH8pxbAeBWgylRjh.eEaK/sStkZ0Np/RZ7Nr6xe440l4mXj1:18563::::::

I've tried to update the system with pacman -Syu as well.
What else can this be?


EDIT 1
I can promote myself to root after login as user, via su. Password works, but not when logging in on tty.

EDIT 2
This does seem to be the case. But are there better solutions?

EDIT 3
Commenting out line with pam_securetty.so lifts restrictions on what tty-s can be used for root login. It works for systemd-nspawn, is less intrusive and maybe this will do for initramfs as well.

# cat /etc/pam.d/login
#%PAM-1.0

#auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
account    include      system-local-login
session    include      system-local-login

Last edited by ThL117 (2020-10-29 01:31:18)

Offline

#2 2020-10-28 15:13:59

loqs
Member
Registered: 2014-03-06
Posts: 18,859

Re: [SOLVED] Can't login as root on linux VT.

Offline

#3 2020-10-29 01:30:42

ThL117
Member
Registered: 2020-10-28
Posts: 7

Re: [SOLVED] Can't login as root on linux VT.

Thanks a lot!
If anyone else ever faces this issue, it can be fixed with:

ln /etc/shadow /etc/shadow.initramfs

Offline

#4 2020-10-29 02:36:01

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED] Can't login as root on linux VT.

That was reverted...
https://github.com/archlinux/svntogit-p … b97df7b5ab

So you might want to make a tiny hook and place it on the dropin dir in /etc

...

using git with a “smartphone” suuuuux


My reposSome snippets

Heisenberg might have been here.

Offline

#5 2020-10-29 08:06:28

ThL117
Member
Registered: 2020-10-28
Posts: 7

Re: [SOLVED] Can't login as root on linux VT.

GaKu999 wrote:

That was reverted...
https://github.com/archlinux/svntogit-p … b97df7b5ab

So you might want to make a tiny hook and place it on the dropin dir in /etc

...

using git with a “smartphone” suuuuux

Well, I solved this another way

# grep -E '^FILES' /etc/mkinitcpio.conf
FILES=('/etc/crypttab' '/etc/passwd' '/etc/shadow')

Still can't make it boot though. It is annoying. Like REALLY annoying.

Offline

Board footer

Powered by FluxBB