Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!ames!amdahl!shs From: shs@uts.amdahl.com (Steve Schoettler) Newsgroups: comp.sources.d Subject: Re: getty/login for callback Summary: Use tip! Keywords: tip getty login Message-ID: <14U6Pf88Sj1010WE=r6@amdahl.uts.amdahl.com> Date: 4 Apr 89 18:57:09 GMT References: <180001@mechp10.UUCP> <13853@rpp386.Dallas.TX.US> <797@twwells.uucp> <597@peritek.UUCP> Reply-To: shs@amdahl.uts.amdahl.com (Steve Schoettler) Distribution: usa Organization: Amdahl Corporation, Sunnyvale CA Lines: 45 In article <597@peritek.UUCP> dig@peritek.UUCP (Dave Gotwisner) writes: >In article <797@twwells.uucp>, bill@twwells.uucp (T. William Wells) writes: >> : In article <180001@mechp10.UUCP> klein@mechp10.UUCP (Greg Klein) writes: >> : >I need the source code for getty(1) and login(1) or something similar if >> : >a public domain version don't exist. I want to modify them to spawn ct(1) >> : >instead of a shell to dial back the user. Please email or post (to >> : >comp.sources.d ?). Thanks. >> > We had something like this at my old job. It was done without modifying >any UNIX software. They had a program which was inserted between >init and getty on the dialup line. Both system 5 and BSD provide the >sysadmin to specify something to be called by init on a line. What it did >was to maintain a list of authorized dialin users and phone numbers >(all encrypted, of course). You phoned in, typed a "login name", it looked >in the file, hung up the phone, and called back the number associated with >the "login name". It then exec'ed getty. The program originally ran on an >ancient Version 6 system (PDP 11/70), and was converted to run on Pyramid's >system without too much difficulty. I wrote something like this by modifying the standard unix tip program. This allowed taking advantage of a standard text file format for storing phone numbers, baud rates, etc. This also allows operation under a variety of modems (hayes and ventel). The program was invoked with "ntip myname", where there was an entry for myname in /etc/remote. All you have to do is find the place where tip makes the connection, and fork a shell, setting stdin and stdout to the serial port. I think the command I actually used inside my exec was "rlogin localhost", because I had trouble creating a getty on the dial out line. You can set stdin and stdout of the shell with the dup() command. Good luck! Steve -- Steve Schoettler shs@uts.amdahl.com {sun,decwrl,pyramid,ames,uunet}!amdahl!shs Amdahl Corp., M/S 213, 1250 E. Arques Ave, Sunnyvale, CA 94088