satimis 发表于 2005-8-24 12:53:26

Fail to login

Hi folks,

BLFS 6.1
FC3 Host

On chroot environment after having installed
CrackLib-2.8.3
http://www.linuxfromscratch.org/blfs/view/stable/postlfs/cracklib.html
Linux-PAM-0.80
http://www.linuxfromscratch.org/blfs/view/stable/postlfs/linux_pam.html

reinstalled Shadow-4.0.9 according to the book;
http://www.linuxfromscratch.org/blfs/view/stable/postlfs/shadow.html

I was held on 'login' (with CrackLib), saying "bash: /etc/pam.d/login: No such file or directory"

According to the "Warning" near the bottom on the same page, reinstalled Shadow-4.0.9 with "--without-libpam" and also moved the /etc/login.defs.orig backup file to /etc/login.defs

Now I can't login LFS 6.1 with following warning;
Login:PAM Failure, aborting: Critical error - immediate abort

I did it twice including removing the source tree of Shadow-4.0.9 and download new packages from Internet as well

What I discovered are follows;

# find /mnt/lfs/ -name login.defs
/mnt/lfs/sources/shadow-4.0.9/etc/login.defs
/mnt/lfs/etc/login.defs

# find /mnt/lfs/ -name security -type d
....
/mnt/lfs/etc/security
/mnt/lfs/lib/security
/mnt/lfs/usr/include/security
/mnt/lfs/usr/lib/firefox-1.0.6/chrome/en-US/locale/global/security
/mnt/lfs/usr/src/linux-2.6.11.12/security
....

# ls -al /mnt/lfs/etc/ | grep pam.d
# ls -al /mnt/lfs/etc/ | grep pam.conf
Both no printout

# find /mnt/lfs/ -name pam.d -type d
/mnt/lfs/sources/shadow-4.0.9/etc/pam.d
......

# ls -al /mnt/lfs/sources/shadow-4.0.9/etc/pam.d/total 128
drwxrwxrwx2 satimis satimis 4096 May 23 19:33 .
drwxrwxrwx3 satimis satimis 4096 May 23 19:33 ..
-rw-rw-r--1 satimis satimis130 Oct 242004 chage
-rw-rw-r--1 satimis satimis133 Oct 242004 chpasswd
-rw-rw-r--1 satimis satimis133 Oct 242004 groupadd
-rw-rw-r--1 satimis satimis133 Oct 242004 groupdel
-rw-rw-r--1 satimis satimis133 Oct 242004 groupmod
-rw-rw-r--1 satimis satimis993 Oct 242004 login
-rw-rw-r--1 satimis satimis264 Oct 262004 Makefile.am
-rw-rw-r--1 satimis satimis 9488 May5 01:00 Makefile.in
-rw-rw-r--1 satimis satimis133 Oct 242004 newusers
-rw-rw-r--1 satimis satimis117 Oct 102000 passwd
-rw-rw-r--1 satimis satimis213 Jan22005 su
-rw-rw-r--1 satimis satimis122 Oct 282004 useradd
-rw-rw-r--1 satimis satimis132 Oct 242004 usermod

# find /mnt/lfs/ -name pam.conf
/mnt/lfs/sources/Linux-PAM-0.80/conf/pam.conf
/mnt/lfs/.Trash-0/files/Linux-PAM-0.80/conf/pam.conf

# ls -al /mnt/lfs/sources/Linux-PAM-0.80/conf/pam.conf
-rw-r--r--1 358 ftp 4415 Apr82001 /mnt/lfs/sources/Linux-PAM-0.80/conf/pam.conf

Both of them were not on;
/etc/pam.d/
/etc/pam.conf

Please advise how to fix the login problme.Whether moving pam.d and pam.conf to their correct directories.

B.R.
satimis

linky_fan 发表于 2005-8-24 20:23:43

Just vim a /etc/pam.d/login


root@test /root]# more /etc/pam.d/login
  #%PAM-1.0
  auth required /lib/security/pam_securetty.so
  auth required /lib/security/pam_stack.so service=system-auth
  auth required /lib/security/pam_nologin.so
  account required /lib/security/pam_stack.so service=system-auth
  password required /lib/security/pam_stack.so service=system-auth
  session required /lib/security/pam_stack.so service=system-auth
  session optional /lib/security/pam_console.so

The code above cp from my centos 4.1 , wish it can work correctly. :arrow:

satimis 发表于 2005-8-24 21:36:21

Hi linky_fan,

Tks for your advice and code.

On BLFS 6.1 Section Shadow-4.0.9
Chapter 4. Security
http://www.linuxfromscratch.org/blfs/view/stable/postlfs/shadow.html       

The step in creating /etc/pam.d directory could not be found compelling me stopped in the middle on that page.As a chain action it caused "unable to login"I think that on chroot environment after running

# install -v -m755 -d /etc/pam.d

and complete that page, the "login problem" will be solved.

I'll come back to the Forum again afterwards.

Tks

B.R.
satimis

satimis 发表于 2005-8-24 23:29:14

Hi folks,

BLFS 6.1
FC3 Host
chroot environment

Login now revived after running;
# install -v -m755 -d /etc/pam.d

and compketing Section Shadow-4.0.9
http://www.linuxfromscratch.org/blfs/view/stable/postlfs/shadow.html

satimis

linky_fan 发表于 2005-8-25 10:57:23

Good! :-D
页: [1]
查看完整版本: Fail to login