bill@ssbn.WLK.COM (Bill Kennedy) (07/26/90)
I have a mysterious and nagging problem that's probably complicated by my ignorance of my 32/400 and 2.01 UNIX. I wrote a program that goes out and manipulates a tty port and uses the modem's result codes to set the baud rate and then exec to either /etc/getty or a credit authorization terminal program. The code works just fine on a '386 Vr3.2 system. If the credit authorization terminal prompts aren't answered it exec's to /etc/getty and I can log in as a login or uucp account. On the Tower I get to getty OK (according to ps) and when I type in my login ID I get to login bill (according to ps) but I never get prompted for a password, it just replies login incorrect and prompts for login again. I've nearly torn the pages out of the book looking for something I missed, but I can't find it. I'm using execve(2) to go to getty and I do pass it the right arguments and an environment I have constructed and pass in *envp[]. Is there some reason that /bin/login would fail that I don't know about? I'm stumped (and at a hard stop). Thanks a bunch! -- Bill Kennedy usenet {texbell,att,cs.utexas.edu,sun!daver}!ssbn!bill internet bill@ssbn.WLK.COM or attmail!ssbn!bill
wescott@Columbia.NCR.COM (Mike Wescott) (07/27/90)
In article <1633@ssbn.WLK.COM> bill@ssbn.WLK.COM (Bill Kennedy) writes: > I wrote a program that > goes out and manipulates a tty port and uses the modem's result codes > to set the baud rate and then exec to either /etc/getty or a credit > authorization terminal program. [...] > On the Tower I get to getty OK (according to ps) and when I type in > my login ID I get to login bill (according to ps) but I never get > prompted for a password, it just replies login incorrect and prompts > for login again. /bin/login can't open /dev/tty to get the password so password checking fails and you get "login incorrect" without even lifting a finger. The most likely reason /dev/tty can't be opened is that there isn't one. /dev/tty is supposed to be the controlling terminal and in this case /bin/login does not have one. A process acquires a controlling terminal when: 1) it inherits one from its parent 2) or it is a process group leader (setpgrp called or parent is init) and it opens a tty which has no associated process group and the process has no controlling terminal already Check out the tty field on a "ps -ef" for the getty or login, if it has a "?" then there is no controlling tty. -- -Mike Wescott mike.wescott@ncrcae.Columbia.NCR.COM
tedmonds@convex.com (Tracy Edmonds) (07/31/90)
In article <1633@ssbn.WLK.COM> bill@ssbn.WLK.COM (Bill Kennedy) writes: >On the Tower I get to getty OK (according to ps) and when I type in >my login ID I get to login bill (according to ps) but I never get >prompted for a password, it just replies login incorrect and prompts >for login again. I've nearly torn the pages out of the book looking >-- >Bill Kennedy usenet {texbell,att,cs.utexas.edu,sun!daver}!ssbn!bill > internet bill@ssbn.WLK.COM or attmail!ssbn!bill Sounds like a modem setup problem to me. Evidently, everytime getty sends its prompt, the modem is echoing it right back. So, getty then reads the echoed characters it just sent as a login name (possible followed by a passwd if getty sends more than one line). As you can see this could become an endless cycle. I would check the modem to make sure it is in the proper mode. -tracy ============================================================================= Tracy Edmonds tedmonds@convex.com Convex Computer Corporation (214) 497-4753 =============================================================================