Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set dial-in a/c's idle time?

Status
Not open for further replies.

eepico

MIS
Jan 6, 2002
60
0
0
HK
Hi,

I have a modem on HP-UX 10 and users can logon by dial-in. My problem is: I want to set an idle time for the user who is logon from the modem. I can simply set an env TMOUT=XXX inside $HOME/.profile to do that. But there is a group of users who are sharing the same home directory and using the same .profile and I cannot set the TMOUT to apply all of them but only want to apply on one user in that group who is using the dial-in modem for logon. How can I do that? Shell script or AT commands? Any hints?

Jack
 
you could write a script that runs out fo cron, that ran /usr/bin/w every so often, and look at the user and idle fields. Then just kill off the user that was idle too long.


crowe
 
although the users are sharing the same home dir and .profile, I am assuming they have unique user ids. If this is the case, add some scripting to the .profile that checks the for the username. Based on the name found, set the TMOUT accordingly.
 
Thanks all! But somebody told me and I've also tested that if the users open a program after shell login (my case: Dynix Library System), the TMOUT will have no effect at all. So may be I need to write a script, put it into cron to check their idle time and kill them accordingly...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top