LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-17-2011, 01:32 AM   #1
rramesh1
LQ Newbie
 
Registered: May 2011
Posts: 14

Rep: Reputation: 1
"Login incorrect" error after boot - no password prompted


I have built a linux image based on kernel 2.6.32.10. The image boots up fine & at the login prompt when I enter the login Id - the
system doesnt prompt for password - instead throws an error message "Login incorrect".

mygway login: admin
Login incorrect

login: root
Login incorrect

From all the search I did, I narrowed this down to be a pam configuration issue. Can someone please correct me where I am wrong (I am
suspecting system-auth):

I checked that the /etc/securetty has an entry "/dev/ttyS0" to allow root to logon via serial console - so I ruled out this file to
be a cause for that error.

Few files that I am not entirely sure are as below:

1) /etc/pam.d/login

sudo cat login
#%PAM-1.0
auth optional /lib/security/pam_securetty.so
auth required /lib/security/pam_stack.so service=system-auth
auth required /lib/security/pam_nologin.so
account optional /lib/security/pam_stack.so service=system-auth
password required /lib/security/pam_stack.so service=system-auth
session optional /lib/security/pam_stack.so service=system-auth
session optional /lib/security/pam_console.so

2) /etc/pam.d/other

$ sudo cat other
#%PAM-1.0
auth required pam_deny.so
auth required pam_warn.so
account required pam_deny.so
account required pam_warn.so
password required pam_deny.so
password required pam_warn.so
session required pam_deny.so
session required pam_warn.so

3) /etc/pam.d/passwd


[gwfs]$ sudo cat passwd
#%PAM-1.0
auth include system-auth
account include system-auth
password include system-auth

4) /etc/pam.d/runuser

[gwfs]sudo cat runuser
#%PAM-1.0
auth sufficient pam_rootok.so
session optional pam_keyinit.so revoke
session required pam_limits.so
session required pam_unix.so

5) /etc/pam.d/system-auth

sudo cat system-auth
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required /lib/security/pam_env.so
auth sufficient /lib/security/pam_unix.so likeauth nullok
auth required /lib/security/pam_deny.so

account required /lib/security/pam_unix.so

password required /lib/security/pam_cracklib.so retry=3 type=
password sufficient /lib/security/pam_unix.so nullok use_authtok md5 shadow
password required /lib/security/pam_deny.so

session required /lib/security/pam_limits.so
session required /lib/security/pam_unix.so

There are few other files like runuser-l, sshd, su, su-l

Here is my /etc/shadow:

bin:*:12204:0:99999:7:::
daemon:*:12204:0:99999:7:::
adm:*:12204:0:99999:7:::
nobody:*:12204:0:99999:7:::
rpm:!!:12204:0:99999:7:::
ntp:!!:12204:0:99999:7:::
ident:!!:12204:0:99999:7:::
named:!!:12204:0:99999:7:::
admin:1$$FJ/PrZEx$0Jj4z565rjS35v5yIy14s/:14453::::::
root:$1$44rrX1z3$5F6hZhHjNkW38WbPYhHfm/:13794::::::
sshd:*:12079::::::

/etc/passwd:

admin::0:0:admin:/home/admin:/bin/bash
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
rpm:x:37:37::/var/lib/rpm:/bin/bash
ntp:x:38:38::/etc/ntp:/sbin/nologin
ident:x:98:98ident user:/:/sbin/nologin
named:x:25:25:Named:/var/named:/bin/false
sshd:*:27:27:sshd privsep:/var/empty:/sbin/nologin


/Ramesh
 
Old 05-17-2011, 07:13 AM   #2
robeich
Member
 
Registered: Aug 2010
Location: Millstreet, Co. Cork, Ireland
Distribution: Linux Mint
Posts: 37

Rep: Reputation: 0
try
login: su

or
login:su admin
 
Old 05-17-2011, 09:48 AM   #3
rramesh1
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: 1
Didnt work, get the same error!
 
Old 05-17-2011, 09:56 AM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531341

Please check your /etc/pam.d/login file, it's probably missing a line
like this:
Code:
auth       optional   pam_faildelay.so  delay=3000000
 
Old 05-17-2011, 10:37 AM   #5
rramesh1
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: 1
Thanks for response.

I added that line, I hit the same error, but it takes a 3 second delay to display that because of that change - but I am trying to find why I get this error "login incorrect"
 
Old 05-22-2011, 12:39 PM   #6
rramesh1
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: 1
Okay.. I figured it out:

I took a vanilla linux rootfs - made a recursive copy of

/usr/lib
/lib

from the vanilla linux rootfs to my target image rootfs:

Also, replaced the etc/login.defs, etc/shadow, etc/passwd and etc/group

I was able to login - In a second pass exercise, I narrowed it down to some missing dependent shared libraries. If someone is struggling with similar symptoms in future - please keep a tab on the /lib & /usr/lib

Phew!!
 
  


Reply



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
"su - root" giving incorrect password but normal root login works. ?? arashi256 Linux - Newbie 10 06-03-2010 03:13 AM
"cant login, login incorrect"init : Id "x" respawning too fast:disabled for 5 minutes allenwoxx Linux - Newbie 1 11-21-2008 10:45 AM
Can you specify a password without being prompted using "scp"? hashbangbinbash Linux - Newbie 8 04-11-2008 05:45 AM
Get "530 Login incorrect." trying to FTP to Slackware 9.1 box. RichDawg Linux - Networking 1 07-22-2004 07:45 PM
Getting "530 Login incorrect" trying to ftp to slackware 9.1 box. RichDawg Linux - Newbie 0 07-22-2004 02:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:41 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