QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1282|回复: 4

Fail to login

[复制链接]
发表于 2005-8-24 12:53:26 | 显示全部楼层 |阅读模式
Hi folks,

BLFS 6.1
FC3 Host

On chroot environment after having installed
CrackLib-2.8.3
http://www.linuxfromscratch.org/ ... stlfs/cracklib.html
Linux-PAM-0.80
http://www.linuxfromscratch.org/ ... tlfs/linux_pam.html

reinstalled Shadow-4.0.9 according to the book;
http://www.linuxfromscratch.org/ ... 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;
LoginAM 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;

[root@localhost satimis]# find /mnt/lfs/ -name login.defs[code:1]
/mnt/lfs/sources/shadow-4.0.9/etc/login.defs
/mnt/lfs/etc/login.defs[/code:1]

[root@localhost satimis]# find /mnt/lfs/ -name security -type d[code:1]
....
/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
....[/code:1]

[root@localhost satimis]# ls -al /mnt/lfs/etc/ | grep pam.d
[root@localhost satimis]# ls -al /mnt/lfs/etc/ | grep pam.conf
Both no printout

[root@localhost satimis]# find /mnt/lfs/ -name pam.d -type d[code:1]
/mnt/lfs/sources/shadow-4.0.9/etc/pam.d
......[/code:1]

[root@localhost satimis]# ls -al /mnt/lfs/sources/shadow-4.0.9/etc/pam.d/[code:1]total 128
drwxrwxrwx  2 satimis satimis 4096 May 23 19:33 .
drwxrwxrwx  3 satimis satimis 4096 May 23 19:33 ..
-rw-rw-r--  1 satimis satimis  130 Oct 24  2004 chage
-rw-rw-r--  1 satimis satimis  133 Oct 24  2004 chpasswd
-rw-rw-r--  1 satimis satimis  133 Oct 24  2004 groupadd
-rw-rw-r--  1 satimis satimis  133 Oct 24  2004 groupdel
-rw-rw-r--  1 satimis satimis  133 Oct 24  2004 groupmod
-rw-rw-r--  1 satimis satimis  993 Oct 24  2004 login
-rw-rw-r--  1 satimis satimis  264 Oct 26  2004 Makefile.am
-rw-rw-r--  1 satimis satimis 9488 May  5 01:00 Makefile.in
-rw-rw-r--  1 satimis satimis  133 Oct 24  2004 newusers
-rw-rw-r--  1 satimis satimis  117 Oct 10  2000 passwd
-rw-rw-r--  1 satimis satimis  213 Jan  2  2005 su
-rw-rw-r--  1 satimis satimis  122 Oct 28  2004 useradd
-rw-rw-r--  1 satimis satimis  132 Oct 24  2004 usermod[/code:1]

[root@localhost satimis]# find /mnt/lfs/ -name pam.conf[code:1]
/mnt/lfs/sources/Linux-PAM-0.80/conf/pam.conf
/mnt/lfs/.Trash-0/files/Linux-PAM-0.80/conf/pam.conf[/code:1]

[root@localhost satimis]# ls -al /mnt/lfs/sources/Linux-PAM-0.80/conf/pam.conf[code:1]
-rw-r--r--  1 358 ftp 4415 Apr  8  2001 /mnt/lfs/sources/Linux-PAM-0.80/conf/pam.conf[/code:1]

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
发表于 2005-8-24 20:23:43 | 显示全部楼层
Just vim a /etc/pam.d/login

[code:1]
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
[/code:1]
The code above cp from my centos 4.1 , wish it can work correctly.
回复

使用道具 举报

 楼主| 发表于 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
回复

使用道具 举报

 楼主| 发表于 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/ ... postlfs/shadow.html

satimis
回复

使用道具 举报

发表于 2005-8-25 10:57:23 | 显示全部楼层
Good!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-3 08:23 , Processed in 0.055755 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表