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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

logging off inactive users on hp unix 10.20

Status
Not open for further replies.

gblc

IS-IT--Management
Mar 9, 2001
3
US
need to know if there's away to have nonactive users automaticly logged off after
X number of minutes of inactivity . Can this be done ??????
 
It can -- but what are your users doing? Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
The problem is that the users that on wireless units are not logging off after there
shifts , as well as other users on pc's running exceed 6.2 , don't log off . They just
close down there windows, this sometimes causes problems by leaving the user
in limbo on the unix box as well as leaving processes running that shouldn't. so I would
like to come up with a way to log off users when there is a period of inactivity.
 
You can use the environment variable TMOUT in the default profile. i.e.
#Make TMOUT so the user can't change it

TMOUT=3600; readonly TMOUT; export TMOUT

#3600 seconds or 60 min. if my math is correct

I put this in the /etc/profile file so every one gets it. But then EVERONE gets it!
 
Hi,

I would be very careful about doing this, the process might be idle, but child processes might not be.
If for example the child process if changing a database (i.e INSERT, DELETE) and the application code has been written such that the child process recognises the parents loss and dies also. If transaction rollback is not implemented, then the database might become corrupt.
If the code has been written such that the child process ignores the loss of it's parent, then when it is finished, it will become a zombie, which can only be rid of by a reboot.

Is this the view of anyone else??

Regards

Unixqueen
 
I don't know, I've seen this feature in the documentation but never used it. Would it still be triggered if a child process was active and had the tty?

man ksh on hpux 11.00 says

TMOUT If set to a value greater than zero, the shell terminates if a command is not entered within the prescribed number of seconds after issuing the PS1 prompt.


When you run a command the PS1 prompt has *not* been issued -- that would imply that the clock is not running when the shell has given up control to a process it has created. As I said, I've never used this. Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top