Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!oliveb!jerry From: jerry@oliveb.UUCP Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Auto-logout. Message-ID: <712@oliveb.UUCP> Date: Thu, 26-Mar-87 21:51:40 EST Article-I.D.: oliveb.712 Posted: Thu Mar 26 21:51:40 1987 Date-Received: Sat, 28-Mar-87 08:25:52 EST References: <868@bc-cis.UUCP> Reply-To: jerry@oliveb.UUCP (Jerry F Aguirre) Organization: Olivetti ATC; Cupertino, Ca Lines: 61 Xref: utgpu comp.unix.questions:1516 comp.unix.wizards:1553 In article <868@bc-cis.UUCP> raanan@bc-cis.UUCP (Raanan Herrmann) writes: > We have a problem of users calling in, then disconnecting without >the logout command. So, the system thinks that they are still logged-in and >it is also a security problem because if somebody dials-in to the same tty >line, he can continue the shell of another user. > > What do I have to do so that such a user will be logged-out if he >disconnect the line? Unix will send a HANGUP signal to the user's processes if the carrier detect (CD) line from the modem drops. The CD line will drop when the modem can no longer "hear" the carrier from the remote modem. This is the normal and intended method for handling this kind of situation. I am posting this rather than mailing it because it seems to be a common problem. A large number of systems do NOT log out when I break the connection. For this to work several things have to be true: 1 - The modem has to be configured to give true carrier to the host. Due to brain-damaged people and systems, many of which require that CD be true at all time, some modems are shipped configured with CD true. You want this OFF. Check the manual for your modem. 2 - CD (pin 8) must be connected from the modem to the host. If you use 3 wire connections, with jumpers on each end to simulate the modem control signals, then you lose. (This is frequently called a "NO-HUP" cable for obvious reasons.) 3 - Your serial line hardware (tty port) must support modem control, at least for CD an preferably for Data Terminal Ready (DTR) also. Some do not have modem support and a few only have it on some of the ports. Again, check your manual, and move the dialin lines to the ports with modem control. 4 - Your software must use the modem control. To simplify connections the software allows declaring a port to be without modem control. In that case there would be no recognition of the CD signal. If all this is set up correctly, then hanging up the phone will automatically log the user out. It is also desirable to have DTR connected from the port to the modem and have the modem jumpered to NOT answer the phone unless DTR is true. This means users get a ring-no-answer when the port is disabled rather than paying for a phone call and finding out they can't log in. It will also hang up your end of the phone after a UUCP connection terminates, important if the other system doesn't have CD connected and won't hang up itself. Believe it or not, some systems out there run without DTR control of the modem. They depend on the other end of the connection hanging up the phone to break the connection. When two such systems call each other for UUCP the connection never is broken. I have seen reports of the net of 48hour+ calls and associated flak about the phone bills. Jerry Aguirre Systems Administration Olivetti ATC