Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!sun-barr!newstop!male!central!vector!egsner!swsrv1!toma From: toma@swsrv1.cirr.com (Tom Armistead) Newsgroups: comp.unix.wizards Subject: Re: /etc/utmp (login, getty) Keywords: utmp Message-ID: <1991May10.065817.12017@swsrv1.cirr.com> Date: 10 May 91 06:58:17 GMT References: <97@morwyn.UUCP> Organization: Software Services: Garland, Tx Lines: 44 In article <97@morwyn.UUCP> forrie@morwyn.UUCP (Forrie Aldrich) writes: >I am porting a couple of pd packages to my machine... one implements the >SHADOW password funcionality and the other is a pd GETTY program. They > STUFF DELETED ... > >My question is how can I get this program to work correctly? My feeling >is that it's the login program that needs the 'tweaking', as getty merely >spawns the process off the main character /dev/window. Whichever I am not >sure of. > >Any help would be greatly appreciated. I have spent a LONG time porting >these applications! > >Thanks in advance. > >Forrie >-- >--------------------=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-------------------- >Forrest Aldrich, Jr.| ...uunet!eci!morwyn!forrie |forrie@morywn.UUCP This my understanding of what happens when someone logs in (not necessarily fact - it would be nice to get the FACTS from someone who KNOWS them?). When init spawns a process (from /etc/inittab) it creats a record in the /etc/utmp file for that line in the inittab file. When getty is spawned by init, it looks up it's process ID in utmp file and updates that entry, setting ut_line to the device passed to getty and ut_type to LOGIN_PROCESS. When getty accepts a username, it exec's /bin/login with that username as a command line argument. /bin/login then prompts for a password and, if valid, looks up it's process id in the utmp file and sets ut_type to be USER_PROCESS and sets ut_line to be the current tty name (minus the path). So, in a long winded way, I think your right in that /bin/login is the one who sets the final tty name in the utmp file and that is probally where your problem is. Maybe this will help you in tracking down the problem? Tom -- Tom Armistead - Software Services - 2918 Dukeswood Dr. - Garland, Tx 75040 =========================================================================== toma@swsrv1.cirr.com {egsner,letni,ozdaltx,void}!swsrv1!toma