Logout Locked Terminal Sessions Automatically

Latest response

I am looking for a method to automatically logout locked terminal sessions that are locked via the vlock command. I have tried setting the TMOUT variable in a file in /etc/profile.d/ but it seems to run in the background and the console doesnt change from the "tty1 is now locked by..." to the standard login screen.

Current Scenario: A users terminal sessions is locked after a set amount of time. If the user logs in before TMOUT has passed, the session resumes as normal. If the user logs in after TMOUT has passed, the user is sent back to the regular login prompt to re-authenticate.

Desired Scenario: A users terminal sessions is locked after a set amount of time. If the user logs in before TMOUT has passed, the session resumes as normal. If TMOUT has passed, the console returns to the normal login prompt (which is what happens if vlock were not used).

Responses