/etc/utmp (login, getty)

Tom Armistead toma at swsrv1.cirr.com
Fri May 10 16:58:17 AEST 1991


In article <97 at morwyn.UUCP> forrie at 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 at 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 at swsrv1.cirr.com                {egsner,letni,ozdaltx,void}!swsrv1!toma



More information about the Comp.unix.wizards mailing list