UBTU-22-412030 - Ubuntu 22.04 LTS must automatically exit interactive command shell user sessions after 15 minutes of inactivity.

Information

Terminating an idle interactive command shell user session within a short time period reduces the window of opportunity for unauthorized personnel to take control of it when left unattended in a virtual terminal or physical console.

Solution

Configure Ubuntu 22.04 LTS to exit interactive command shell user sessions after 15 minutes of inactivity.

Create and/or append a custom file under '/etc/profile.d/' by using the following command:

$ sudo su -c 'echo TMOUT=900 >> /etc/profile.d/99-terminal_tmout.sh'

This will set a timeout value of 15 minutes for all future sessions.

To set the timeout for the current sessions, execute the following command over the terminal session:

$ export TMOUT=900

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_CAN_Ubuntu_22-04_LTS_V2R2_STIG.zip

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-12, CAT|II, CCI|CCI-002361, Rule-ID|SV-260554r958636_rule, STIG-ID|UBTU-22-412030, Vuln-ID|V-260554

Plugin: Unix

Control ID: d54c012b1360d2cb974e81c6afeb442b71c566a2a696ec1cd525b363cd8db2f2