5.4.5 Ensure default user shell timeout is 900 seconds or less - /etc/bashrc

Information

The default TMOUT determines the shell timeout for users. The TMOUT value is measured in seconds.

Rationale:

Having no timeout value associated with a shell could allow an unauthorized user access to another user's shell session (e.g. user walks away from their computer and doesn't lock the screen). Setting a timeout value at least reduces the risk of this happening.

Solution

Edit the /etc/bash.bashrc, /etc/profile, and /etc/profile.d/*.sh files (and the appropriate files for any other shell supported on your system) and add or edit any TMOUT parameters as follows:

TMOUT=600

Notes:

The audit and remediation in this recommendation apply to bash and shell. If other shells are supported on the system, it is recommended that their configuration files also are checked. Other methods of setting a timeout exist for other shells not covered here.

See Also

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

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-11, CSCv7|16.11

Plugin: Unix

Control ID: 31f0f0884d7eeca1292501ab8a3afc3ed1bd04146b615035e6a06da3b4429f5e