I want to be able to logout inactive sessions on my webserver.
I have done this like so:
13. Restrict idle users. Timeout after a certain pre-defined amount of time. a. In the directory /etc/profile.d: i. Create a file called autologout.sh and add the following lines: TMOUT=300 readonly TMOUT export TMOUT This sets autologout settings for the bash shell. ii. Create a file called autologout.csh and add the following lines: set -r autologout 5 iii. Add execute privileges to both files with: sudo chmod +x /etc/profile.d/autologout.* I notice that the above lines log the user out only from the current active account and not terminate the session completely.
eg.) If I sudo-ed to root, I am logged out of root and returned to my user account.
Can I log the user out completely? If so, how do I do it?