r/linuxfromscratch • • 14d ago

root login incorrect on lfs

Post image

Fixed!!!

i cant log in my new lfs.

/etc/passwd and /etc/shadpw are correct , also it logs when I do 'log root' in chroot from my host and everythin works fine except for that

11 Upvotes

15 comments sorted by

7

u/allunia333 13d ago

I have seen this in the past.... try in the run service: exec chpst -P /usr/sbin/agetty --noclear tty1

1

u/RegularSociety4238 13d ago

it worked. I had something similar in my /etc/service/agetty/run. It was: exec /sbin/agetty --noclear tty1 38400 linux

now i fixed it to : exec chpst -P /sbin/agetty --noclear tty1 38400 linux and this time it logged

Thank you, I am really very grateful

2

u/allunia333 13d ago

Glad it helped!

This is a nasty thing to troubleshoot and a big rabbit hole of why and how it works, but since you are making an lfs system , i suggest to at least research the surface a bit(don't go too deep and lose time ).

1

u/RegularSociety4238 13d ago

ye im glad you mentioned it. I actually understand the surface a bit now.

anyway i hav3 to keep doing research about this , thanks again;]

3

u/Easy_Sheepherder_289 14d ago

Remount and chroot

1

u/RegularSociety4238 14d ago

Alrwady did that. several times snd didnt work

1

u/Rockytriton Mod 14d ago

try adding another user, does that user have the same issue, if not can you login to root with su after that? Assuming you haven't installed pam yet or anything like that.

1

u/RegularSociety4238 14d ago

i havent try it but im really sure it wont work. the problem is only and definitively with login

1

u/Rockytriton Mod 14d ago

maybe try in chroot running:
pwconv
passwd root

then retry logging on

1

u/RegularSociety4238 14d ago

also im not using pam

1

u/tiny_humble_guy 14d ago

Do you have linux-pam installed ?

0

u/Szelethus 14d ago

Could it be a keyboard layout issue? Some keyboards (like hungarian) have y and z switched up. Though I recall LFS set that up as well.

1

u/RegularSociety4238 14d ago

nope. my passwd obly has numbers and its 5 characters long. also i mentioned 'log root' in chroot works perfectly so the passwd isnt the issue :[