LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Problems with Linux-PAM - can't log in! (http://www.linuxquestions.org/questions/linux-from-scratch-13/problems-with-linux-pam-cant-log-in-759563/)

lloydsmart 10-04-2009 05:35 AM

Problems with Linux-PAM - can't log in!
 
Hi.

As the title suggests, I've just installed Linux-PAM as per the CBLFS instructions, on an x86_64 pure64 build, and recompiled and reinstalled shadow. Now I can't log in to my system at all. Help!

The system boots just fine, then it gets to the login prompt, and no matter what I type, it always says "login incorrect" without even prompting for a password, then every 3 seconds or so it will repeat the "login incorrect message", until it has done so 5 times. Then it quickly flashes up something like "exceeded maximum login attempts" (I can't read it properly because it clears the screen really quickly after that appears), and it returns me to the login prompt!

I have only one normal user account set up at the moment, plus root.

Can anyone help? I don't know what to do! Is it something to do with a PAM configuration file somewhere? Which one?

Thanks in advance!

EDIT: I deleted the whole pam.d directory and just went with a very simple /etc/pam.conf to see where that would get me, and now my previous problem gas gone but a new one has appeared instead. When I log in now it does ask me for a password, but when I give it I just get "Module is unknown", then I'm returned to the login prompt.

Incidentally, if I give wrong login details, it says "Login incorrect, as you'd expect.

weibullguy 10-04-2009 01:11 PM

Your original problem was caused by an error in /etc/pam.d/system-auth. Most likely you used the one for systems with cracklib. Recreate the PAM configuration files as described in CBLFS, but use the correct system-auth. Either that or get rid of PAM support.

lloydsmart 10-04-2009 01:16 PM

I did the one for systems with cracklib because I installed cracklib. Perhaps I should have made that clear. Ideally, all I really need is plain old shadow with cracklib, and to forget about PAM altogether, but how do I remove PAM?

On the other hand, how difficult would it be to get PAM working from my current situation? I can mount the ext2 partition in Windows to modify any config files necessary, and I wouldn't mind having PAM support at all, it's just not really a necessity.

What would you recommend I do? Try to remove PAM or try to get it working? Either way I do want to use cracklib. Thanks!

lloydsmart 10-05-2009 07:20 AM

Ok, I've re-done all the PAM config files as per the CBLFS website, as weibullguy suggested. Now I'm back to the original error of "Incorrect Login" repeating itself several times.

I've decided I really don't need PAM support, at least for the time being, and I'd like to remove it. Can anyone give me a list of files I need to delete, or is it more complicated than that?

Thanks.

weibullguy 10-05-2009 08:29 AM

You should be able to rebuild shadow without PAM support to get your login ability back. Unless you build an application to be PAM-aware, it won't be. But, some apps' configure script may pick up PAM by default.

To completely remove PAM, start with the list of files and directories at the bottom of the wiki page. I don't know how complete the list is. There may be some documentation files left.

ProtoformX 10-06-2009 12:54 AM

This is not really solved is it? I mean if you were to reinstall PAM you are still unable to login right?

lloydsmart 10-06-2009 07:23 AM

Probably, I haven't tried it. I can now log in, though, so my problem is solved, in the sense that the problem was not being able to log in, and now I can.


All times are GMT -5. The time now is 07:35 PM.