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

Automatic Logoff Of Sco Unix Accounts 4

Status
Not open for further replies.
Mar 5, 2003
53
US
I'm looking for the exact command and what directory to setup Unix accounts to automatically logoff after 1 hour of inactivity. Step by step instructions would be greatly appreciated as that I do not know alot about Unix. Thanks
 
To logout all users after 1 hour of inactivity - Login as root type 'idleout 1:0'

For instructions on making this permenent after every re-boot type 'man idleout'
 
Hopefully you know how to use vi, the visual editor?

If so, create a script called /etc/rc2.d/S99idleout containing:

[tt]echo "Starting idleout (using 60 seconds)..."
/usr/bin/idleout 60[/tt]

That will ensure it is set every time the system is booted. Then just type /etc/rc2.d/S99idleout to start it right now. Annihilannic.
 
Example:
/usr/bin/idleout 60

here is the man page for idleout:

idleout -- log out idle users

Syntax
======

idleout [ minutes | hours:minutes ]

Description
===========

The idleout command monitors line activity and logs out users whose terminal
remains idle longer than a specified period of time. Minutes are assumed;
if a colon appears in the number, hours are assumed.

The utility uses a default file, /etc/default/idleout, to indicate the
interval a user's terminal may remain idle before being logged out. This
file has one entry:

IDLETIME=time

The time format is identical to that used on the command line. The time
specified in the default file is overridden by idletime if idletime is
specified on the command line. Note that, if idletime is zero, no
monitoring takes place and idle users are not logged out. You can either
run idleout from the command line, or, to have continuous coverage, you
must add the program name in /etc/rc2.d/S88USRDEFINE to see to it that the
program is run each time the system is rebooted.

Files
=====

/etc/default/idleout
/etc/utmp
/etc/wtmp


 
I tried that setting. I got a permission denied message when I tried to start the script? Any thoughts?
 
You can start it manually by typing /etc/rc2.d/yourfilename
 
No, you can run and reset the idle timeout at any time.

the idea of putting it in /etc/rc2.d is that it will then run every time the server is rebooted. i was guessing that you created a new file in /etc/rc2.d and if you did not set the execute permission on the script file you would get the permission denied error.

in unix you generally do not have to reboot a system unless you have made changes to the kernel.
 
Its' process id is in /usr/spool/locks/LCK..idleout

so if that file exists then idleout is probably running.
 
Their is nothing listed under the spool directory. Is their somewhere else I could see the idleout script running? Thanks
 
Thanks for all the help. I'm still having some issues, but I believe it has to do with the database application running on our Sco Box. CMHC\Systems. Could this cause issues with what I'm trying to do?
 
Hello fellow CMHC user jimv2502893.

No, the CMHC software does not interfere with idleout, although I personally don't recommend forcefully terminating idle CMHC connections. If a session is terminated in the middle of certain processes such as CASH AP (.7.2.5) your system could go out of balance. My recommendation is to train the users to not leave the system logged in when not in use, and to manually terminate idle terminals if there is a problem.

For CMHC related OS questions you should contact their customer support (providing you have an OS support contract). If you don't have an OS support contract you might also be able to get help through the CMHC national user's group (
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top