5.4.11 Ensure default user shell timeout is 600 seconds or less

Information

The operating system must be configured so that all network connections associated with a communication session are terminated at the end of the session or after 10 minutes of inactivity from the user at a command prompt, except to fulfill documented and validated mission requirements.

Rationale:

Terminating an idle session within a short time period reduces the window of opportunity for unauthorized personnel to take control of a management session enabled on the console or console port that has been left unattended. In addition, quickly terminating an idle session will also free up resources committed by the managed network element.

Terminating network connections associated with communications sessions includes, for example, de-allocating associated TCP/IP address/port pairs at the operating system level and de-allocating networking assignments at the application level if multiple application sessions are using a single operating system-level network connection. This does not mean that the operating system terminates all sessions or network access; it only ends the inactive session and releases the resources associated with that session.

Solution

Configure the operating system to terminate all network connections associated with a communications session at the end of the session or after a period of inactivity.
Create a script to enforce the inactivity timeout (for example /etc/profile.d/tmout.sh) such as:
Example: vim /etc/profile.d/tmout.sh
Add the following lines to the script.

#!/bin/bash

TMOUT=600
readonly TMOUT
export TMOUT

Notes:

This Benchmark recommendation maps to:

Red Hat Enterprise Linux 7 Security Technical Implementation Guide:

Version 2, Release: 3 Benchmark Date: 26 Apr 2019



Vul ID: V-72223

Rule ID: SV-86847r4_rule

STIG ID: RHEL-07-040160

Severity: CAT II

See Also

https://workbench.cisecurity.org/files/2688

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-12

Plugin: Unix

Control ID: fbd3e897c088b81bd06f1ebb09a823bc96a31ccb415d123f39fde6630331e75d