Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 103796 - shadow's login behaves funny
Summary: shadow's login behaves funny
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 110210 122731 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-25 22:40 UTC by SpanKY
Modified: 2006-02-13 14:02 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2005-08-25 22:40:25 UTC
i noticed this a while back but was never able to figure out what was going on
... it seems that the login from shadow tries too hard ... it tries to do the
job of agetty which it probably shouldnt ...

for example:

This is vapier.(none) (Linux x86_64 2.6.11.12-grsec) 01:05:20

vapier login: alksfjalksdfj
Password: 
Login incorrect

This is \n.\O (\s \m \r) \t


vapier login: 


that's odd ... why didnt my /etc/issue get parsed ?  it's because that 2nd login
prompt is not from agetty (which does parse /etc/issue) but rather from
/bin/login !  to reproduce, emerge shadow with USE=-pam and run:
agetty 38400 `tty` linux
then type in an invalid username/password combo

my understanding of the situation may be wrong, but i think the behavior is
supposed to be:
- agetty loads up, plays with the terminal, parses /etc/issue (translating all
the escape sequences), outputs the 'login:', waits for and reads in the
specified username, then executes the specified login program (/bin/login by
default)
- the login program receives the username, reads in the password, and then does
the verification ... if verification fails, login exits
- init restarts agetty on the terminal and everything starts over
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2005-08-26 04:46:49 UTC
I am going to assume you guys have to comment ISSUE_FILE in /etc/login.defs for
non PAM builds ?
Comment 2 SpanKY gentoo-dev 2005-08-26 06:14:35 UTC
that would work around the problem i guess ...

semi-related note ... if we've stopped using the official 'pam-login'
package, why not fold pam-login's functionality back into the shadow ebuild ?
we could punt the virtual/login cruft if we do ...
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2005-08-26 14:39:19 UTC
(In reply to comment #2)
> that would work around the problem i guess ...
> 

Not really a workaround ... if the getty do not support it, you can do it via
ISSUE_FILE for non-pam login, or pam_issue for pam login.  Guess shadow's login
was just broken in that regards in the past.

> semi-related note ... if we've stopped using the official 'pam-login'
> package, why not fold pam-login's functionality back into the shadow ebuild ?
> we could punt the virtual/login cruft if we do ...

Yeah, that is the plan .. question is how, as pam-login is in the profiles. 
Maybe make a stub that just depend on specific shadow that does that until that
shadow stable on all arches.
Comment 4 SpanKY gentoo-dev 2005-08-26 16:37:29 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > that would work around the problem i guess ...
>
> Not really a workaround ... if the getty do not support it, you can do it via
> ISSUE_FILE for non-pam login, or pam_issue for pam login.  Guess shadow's
> login was just broken in that regards in the past.

no, i'm pretty sure it's always been like this ... the ability to have a pamless
system is new though so it's just come up

> > semi-related note ... if we've stopped using the official 'pam-login'
> > package, why not fold pam-login's functionality back into the shadow ebuild ?
> > we could punt the virtual/login cruft if we do ...
> 
> Yeah, that is the plan .. question is how, as pam-login is in the profiles. 
> Maybe make a stub that just depend on specific shadow that does that until that
> shadow stable on all arches.

i think we have virtual/login in the profiles ...
Comment 5 SpanKY gentoo-dev 2005-10-23 16:48:47 UTC
*** Bug 110210 has been marked as a duplicate of this bug. ***
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2005-10-24 08:15:49 UTC
You still gonna fix /etc/login.defs for non-pam builds to not define ISSUE_FILE ?
Comment 7 SpanKY gentoo-dev 2005-10-24 08:19:47 UTC
4.0.13 already has this change ... it's still -* though cause i wanted
you to review the updates first :)
Comment 8 SpanKY gentoo-dev 2006-01-13 17:54:20 UTC
newer versions have this "fixed"
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2006-02-13 14:02:55 UTC
*** Bug 122731 has been marked as a duplicate of this bug. ***