Operating System - HP-UX
1849290 Members
6415 Online
104042 Solutions
New Discussion

Auto unlock/logoff of machines locked for a long time

 
Paul Mezzanini
Advisor

Auto unlock/logoff of machines locked for a long time

Hey everyone... I got an interesting problem that I just can't seem to find the solution to. Google is coming up with a pretty bad S:N ratio so I can't even find good info that way.

On to the description of my problem:

I run a lab of ~30 machines. Students like to lock the workstations and just walk away. I would like to find some way to auto log people out if they have had the workstation locked for X amount of time.

Even better would be to figure out where the lock is being called (xlock? some code in dtlogin?) and change that to a custom program.

In this dream system, the user would hit lock and then type in a reason for the lock. Then the lock would last for X amount of time (configured by me) until the machine auto-unlocked and logged off. If it is an idle lock instead of a user invoked lock the timeout would be Y instead of X.

I plan on having the limits high enough so that saving data dosent really matter. If they are idle for 5 hours, screw 'em they don't deserve the workstation :)

I'm almost ready to just set a cronjob to reboot the workstations at 4 AM or something. Every morning I go down there and unlock machines. Half of them are just at the desktop too, no apps running at all.

Ok. enough of my ranting... any ideas?

-paul

p.s. I wish this text entry box was bigger, its pretty small for entering text of this nature.
3 REPLIES 3
Pete Randall
Outstanding Contributor

Re: Auto unlock/logoff of machines locked for a long time

It's easy enough to force them off by killing there dtsession manager, the tough part is configuring the timer you desire. I'd go for the cron'd reboot myself - it's simple and effective.

Pete

Pete
Uday_S_Ankolekar
Honored Contributor

Re: Auto unlock/logoff of machines locked for a long time

This might help you , It's from the knowledge base...
The only way to remotely unlock a dtscreen lock in the HP-UX 10.20
and 11.00 environments is to kill dtsession. dtscreen operates in
conjunction with the local session manager.

Unlike Sun, HP does not have a separate xlock process. dtsession
performs the locking and unlocking. dtscreen sends a message to
the local dtsession to request the lock. Only the local dtsession
can unlock once dtscreen sends the message to the local dtsession
to request the lock.

The dtscreen client provides the default screen saver animations
for the desktop. When launched, it will query the desktop using
the API for the set for window ids on which to draw. These window
ids could be the cover windows created by the session manager for
session lock, or a window embedded in the style manager's session
lock customization dialog. Once obtained, the dtscreen client
will proceed to draw in these windows using the specified options.
If dtscreen cannot obtain the set of window ids, it will create
its own window ids. Normally, the dtscreen client will be invoked
directly by the session manager, or by the style manager.

Note that the Session Manager, dtsession, is responsible for
locking the session and prompting for a password to unlock.


Goodluck,
-USA..
Good Luck..
Alex Glennie
Honored Contributor

Re: Auto unlock/logoff of machines locked for a long time

send me an email see my profile ... someone has already written a program that does this and integrated it with CDE : extract :

Any X Window application in use with an open
connection to the X Server Display currently being used by
a user with KillSaver enabled may be killed if the user is
idle and KillSaver kills the session. Any unsaved data may
be lost.

ps is this necessary as the root password unlocks CDE's users screenlocks