LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Cannot log in after installing shadow/PAM (http://www.linuxquestions.org/questions/linux-from-scratch-13/cannot-log-in-after-installing-shadow-pam-897161/)

TKH 08-13-2011 04:40 PM

Cannot log in after installing shadow/PAM
 
Hello, I have problem with the Login, and I figured out it is related to my shadow / PAM config issues. The problem is: I don't know those issues.

Started when I reinstalled the Shadow after I installed Linux-PAM and Cracklib (which wasn't installed before, of course). After that, I restarted my computer and found that I cannot login! The error shows that I enter the wrong password even though I enter the right one. I even tried to change the password (via a chroot from another Linux OS), wrote it down, and still got the same prob!

FYI, I'm not using any X Windows.

Can someone help me? Thanks!

unSpawn 08-14-2011 03:48 AM

Quote:

Originally Posted by TKH (Post 4442131)
Started when I reinstalled the Shadow after I installed Linux-PAM and Cracklib (which wasn't installed before, of course).

If PAM isn't installed by default then it might require additional configuration before you can use it. Which distribution are you talking about? Did you follow any documentation installing PAM? Re-installing shadow passwords may not or may re-initialize or clear out /etc/shadow. Did you follow any documentation for this too? Did you check /etc/shadow contents? Did you convert /etc/passwd to use shadow passwords?


Quote:

Originally Posted by TKH (Post 4442131)
I even tried to change the password (via a chroot from another Linux OS),

From your other OS you could try changing the entry for root in both /etc/passwd and /etc/shadow and see if that gets you in.

* BTW I changed your thread title to something more clear and this thread will be moved a more appropriate forum RSN as it is not a security but a software issue.

TKH 08-14-2011 11:21 AM

Quote:

Originally Posted by unSpawn (Post 4442398)
If PAM isn't installed by default then it might require additional configuration before you can use it. Which distribution are you talking about? Did you follow any documentation installing PAM? Re-installing shadow passwords may not or may re-initialize or clear out /etc/shadow. Did you follow any documentation for this too? Did you check /etc/shadow contents? Did you convert /etc/passwd to use shadow passwords?

I already set up some stuff on pam.d and login.defs. I do notice when I looked closer, I have a feeling that it might be related to encryption problem because the system seemed to not be able to read the passwd file (I feel so..)
By the way, if you ask me, I'm using Linux From Scratch as my experimental Distro.

Thanks!

unSpawn 08-14-2011 06:51 PM

Quote:

Originally Posted by TKH (Post 4442676)
I'm using Linux From Scratch

I've moved your thread to the LFS forum.


Quote:

Originally Posted by TKH (Post 4442676)
I already set up some stuff on pam.d and login.defs. (..) it might be related to encryption problem because the system seemed to not be able to read the passwd file (..)

One of the things you'll learn from working with computers (versus humans) is that conditions are binary: a bit is flipped, a value is true, a file exists or not, and not based on "feelings" or "worries". This makes it easier to follow any post-LFS installation steps and test results to see at which point you failed. Best start by retracing your steps. Ten points if you work methodically and keep a log of actions you performed.

druuna 08-15-2011 01:37 AM

Hi TKH,

The first thing that came to mind when reading this thread: Did the login test work when building these packages? (the one mentioned here: Shadow-4.1.4.2 - The Warning box).

If you haven't solved this yet I would suggest reinstalling these three packages in this oredr:

CrackLib-2.8.18
Linux-PAM-1.1.3
Shadow-4.1.4.2

Use a liveCD (or, if present, another distro on that box) and chroot into LFS (using the chroot command mentioned here: LFS 6.63).

Hope this helps.

TKH 08-20-2011 08:48 AM

I've install all the packages mentioned in the shadow dependencies. It works fine after. Thanks...

druuna 08-21-2011 03:21 AM

You're welcome :)


All times are GMT -5. The time now is 04:47 PM.