[SOLVED] Cannot log in after installing shadow/PAM
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
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
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.
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.
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.
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.