LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Can't login to buildroot based FS image (https://www.linuxquestions.org/questions/linux-security-4/cant-login-to-buildroot-based-fs-image-921479/)

prushik 01-01-2012 07:32 AM

Can't login to buildroot based FS image
 
I made a FS image with buildroot for x86_64, and I have loop mounted it and chrooted into it and added users to it as well as changing the root password. I tested it and made sure i could su all around to different users and all the passwords worked, and /etc/shadow and /etc/passwd exist and look fine to me.
Now I am using qemu to boot into the fs image using a kernel that I built, and it all works great except when I get the login prompt, nothing works. no matter what I type it always tells me the password is wrong. Its really annoying because I know that I have done this before successfully.
The buildroot version I used was a snapshot from 12/30/2011. Anybody have a similar issue and/or have any tips?

Web31337 01-01-2012 07:43 AM

Hmm, I remember something similar with my distro. Are you sure the shell you use with that account is in /etc/shells? Can you login with "login" from root or is it just a console? There's also /etc/securetty in buildroot images IIRC, that can solve the problem with terminals.

prushik 01-01-2012 05:34 PM

Quote:

Originally Posted by Web31337 (Post 4563091)
Hmm, I remember something similar with my distro. Are you sure the shell you use with that account is in /etc/shells? Can you login with "login" from root or is it just a console? There's also /etc/securetty in buildroot images IIRC, that can solve the problem with terminals.

hmmm... /etc/shells doesn't seem to exist. But I made sure that the account uses ash as the shell, since that's the only one available. If the default shell was the problem, shouldn't it give me another error besides "login incorrect"? I already looked at /etc/securetty, I had to add tty0 to it to get this far since opening a getty on tty1 didn't seem to do anything.
Running "login" as root in the chroot environment doesn't seem to do anything at all, it just exits without switching users or asking for a login, no output at all.


All times are GMT -5. The time now is 11:05 PM.