We help IT Professionals succeed at work.

Log off idle users by tty?

brando
brando asked
on
1,060 Views
Last Modified: 2013-12-26
I'm running SCO 3.2.4 without a DOS partition.  I have two modem lines which have idle
users on a long distance call for hours.  I don't want to use the idle out feature or the autolog off because other users running long posting or printing jobs appear idle and will get logged off too (or at least I think they will).  Is there any way to auto log off idle tty1A and tty2A? Note: I don't know if this makes a difference, but I am not using the uucp.  We are simply using the modems for dial in from PC to the Unix box.  I want this to be an automatic process without any assistance from root.  I'm the only IT person for the company and don't have time to babysit these users.  Thanks.
Comment
Watch Question

Yes.

Author

Commented:
Adjusted points to 50

Author

Commented:
Edited text of question
kill -9 <lowest pid of process using tty2A && pid is a shell>
as root:
kill -9 <lowest pid of process using tty2A && pid is a shell>

Commented:
I think what brando wants is to have those processes killed automatically, without root's intervention.

Author

Commented:
Edited text of question
Write a script using the "w" or "ps ax" command to identify the users you want to kick off, thenn kill there session shell.

Call this script via cron.
ecw

Commented:
Set them up as ksh users and set TMOUT in their .profile.  eg.

 typeset -r TMOUT=600  # 10 minutes grace
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
ecw's response was very close.  This does log out the user's; however, our software runs in the sh shell.  Once switched over to this shell it logs the user out of ksh but does not log off the modems.  At this point I give up.

Author

Commented:
I've got it.  I was making this far too complicated.  I disable the actual device (tty1A), connected to the control device (tty1a).  Sent the command to change the S19 register for the modem to 15 (ATS19=15).  Enable tty1A.  It works.  
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.