{"description": "Setting the <tt>TMOUT</tt> option in <tt>/etc/profile</tt> ensures that\nall user sessions will terminate based on inactivity. A value of <tt>0</tt> (zero)\ndisables the automatic logout feature and is therefore not a compliant setting.\nThe value of TMOUT should be a positive integer, exported, and read only.\nThe <tt>TMOUT</tt>\n\nsetting in a file loaded by <tt>/etc/profile</tt>, e.g.\n<tt>/etc/profile.d/tmout.sh</tt> should read as follows:\n<pre>TMOUT=<sub idref=\"var_accounts_tmout\" /></pre>\nreadonly TMOUT\nexport TMOUT", "rationale": "Terminating an idle session within a short time period reduces\nthe window of opportunity for unauthorized personnel to take control of a\nmanagement session enabled on the console or console port that has been\nleft unattended.", "severity": "medium", "references": {"cis-csc": ["1", "12", "15", "16"], "cobit5": ["DSS05.04", "DSS05.10", "DSS06.10"], "cui": ["3.1.11"], "isa-62443-2009": ["4.3.3.6.1", "4.3.3.6.2", "4.3.3.6.3", "4.3.3.6.4", "4.3.3.6.5", "4.3.3.6.6", "4.3.3.6.7", "4.3.3.6.8", "4.3.3.6.9"], "isa-62443-2013": ["SR 1.1", "SR 1.10", "SR 1.2", "SR 1.5", "SR 1.7", "SR 1.8", "SR 1.9"], "iso27001-2013": ["A.18.1.4", "A.9.2.1", "A.9.2.4", "A.9.3.1", "A.9.4.2", "A.9.4.3"], "nerc-cip": ["CIP-004-6 R2.2.3", "CIP-007-3 R5.1", "CIP-007-3 R5.2", "CIP-007-3 R5.3.1", "CIP-007-3 R5.3.2", "CIP-007-3 R5.3.3"], "nist": ["AC-12", "SC-10", "AC-2(5)", "CM-6(a)"], "nist-csf": ["PR.AC-7"], "srg": ["SRG-OS-000163-GPOS-00072", "SRG-OS-000029-GPOS-00010"], "anssi": ["R32"], "cis": ["5.4.3.2"], "pcidss4": ["8.6.1", "8.6"], "stigid": ["UBTU-22-412030"], "stigref": ["SV-260554r958636_rule"]}, "control_references": {"anssi": ["R32"], "cis": ["5.4.3.2"], "pcidss4": ["8.6.1", "8.6"], "stigid": ["UBTU-22-412030"]}, "components": [], "identifiers": {}, "ocil_clause": "the TMOUT value is not configured, is set to 0, or is not less than or equal to the expected setting", "ocil": "Run the following command to ensure the <tt>TMOUT</tt> value is configured for all users\non the system:\n\n<pre>$ sudo grep TMOUT /etc/bash.bashrc /etc/profile /etc/profile.d/*.sh</pre>\n\nThe output should return the following:\n<pre>TMOUT=<sub idref=\"var_accounts_tmout\" /></pre>\n\nreadonly TMOUT\nexport TMOUT", "oval_external_content": null, "fixtext": "Configure Ubuntu 22.04 to terminate user sessions after <sub idref=\"var_accounts_tmout\" /> seconds of inactivity.\n\nAdd or edit the following line in \"/etc/profile.d/tmout.sh\":\nTMOUT=<sub idref=\"var_accounts_tmout\" />", "checktext": "", "vuldiscussion": "", "srg_requirement": "", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {"stig": {"srg_requirement": "Ubuntu 22.04 must automatically exit interactive command shell user sessions after 15 minutes of inactivity.", "vuldiscussion": "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.", "checktext": "Verify Ubuntu 22.04 is configured to exit interactive command shell user sessions after 15 minutes of inactivity or less with the following command:\n\n$ sudo grep -i tmout /etc/profile /etc/profile.d/*.sh\n\n/etc/profile.d/tmout.sh:declare -xr TMOUT=900\n\nIf \"TMOUT\" is not set to \"900\" or less in a script located in the \"/etc/'profile.d/ directory, is missing or is commented out, this is a finding.", "fixtext": "Configure Ubuntu 22.04 to exit interactive command shell user sessions after 15 minutes of inactivity.\n\nAdd or edit the following line in \"/etc/profile.d/tmout.sh\":\n\n#!/bin/bash\n\ndeclare -xr TMOUT=900"}}, "platform": "system_with_kernel", "platforms": ["system_with_kernel"], "sce_metadata": {}, "inherited_platforms": [], "cpe_platform_names": ["system_with_kernel"], "inherited_cpe_platform_names": [], "bash_conditional": null, "fixes": {}, "title": "Set Interactive Session Timeout", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/accounts/accounts-session/accounts_tmout/rule.yml", "template": null}