LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 08-13-2011, 04:40 PM   #1
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 223

Rep: Reputation: 20
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!
 
Old 08-14-2011, 03:48 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by TKH View Post
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 View Post
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.
 
Old 08-14-2011, 11:21 AM   #3
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 223

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by unSpawn View Post
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!
 
Old 08-14-2011, 06:51 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by TKH View Post
I'm using Linux From Scratch
I've moved your thread to the LFS forum.


Quote:
Originally Posted by TKH View Post
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.
 
1 members found this post helpful.
Old 08-15-2011, 01:37 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
1 members found this post helpful.
Old 08-20-2011, 08:48 AM   #6
TKH
Member
 
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 223

Original Poster
Rep: Reputation: 20
I've install all the packages mentioned in the shadow dependencies. It works fine after. Thanks...
 
Old 08-21-2011, 03:21 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
You're welcome
 
1 members found this post helpful.
  


Reply

Tags
blfs, lfs, pam, shadow



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Unix-chkpwd problem with Linux-PAM-1.1-1 trying to run su from shadow-4.1.4.2 hoes Linux - Security 4 04-07-2016 03:25 AM
How to make a unified login? (PAM, LDAP, /etc/shadow, Samba, etc) Kernel Johnson Linux - Security 1 03-26-2010 01:09 AM
/etc/shadow + pam.d configs -- Do they hate each other? ddxC Red Hat 2 09-18-2009 01:31 AM
PAM/shadow question: How do I force the password to be changed? clacour Linux - Security 1 03-25-2004 01:31 AM
postfix + smtpauth + pam/shadow dazk Debian 0 07-30-2003 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration