{"description": "Change the group owner of interactive users home directory to the\ngroup found in <tt>/etc/passwd</tt>. To change the group owner of\ninteractive users home directory, use the following command:\n<pre>$ sudo chgrp <i>USER_GROUP</i> /home/<i>USER</i></pre>\n\nThis rule ensures every home directory related to an interactive user is\ngroup-owned by an interactive user. It also ensures that interactive users\nare group-owners of one and only one home directory.", "rationale": "If the Group Identifier (GID) of a local interactive users home directory is\nnot the same as the primary GID of the user, this would allow unauthorized\naccess to the users files, and users that share the same group may not be\nable to access files that they legitimately should.", "severity": "medium", "references": {"srg": ["SRG-OS-000480-GPOS-00227"], "cis": ["7.2.9"]}, "control_references": {"cis": ["7.2.9"]}, "components": [], "identifiers": {}, "ocil_clause": "the group ownership is incorrect", "ocil": "To verify the assigned home directory of all interactive users is group-\nowned by that users primary GID, run the following command:\n<pre># ls -ld $(awk -F: '($3&gt;=1000)&amp;&amp;($7 !~ /nologin/){print $6}' /etc/passwd)</pre>", "oval_external_content": null, "fixtext": "Change the group owner of a local interactive user\u2019s home directory to the group found in \"/etc/passwd\". To change the group owner of a local interactive user\u2019s home directory, use the following command:\n\nNote: The example will be for the user \"smithj\", who has a home directory of \"/home/smithj\", and has a primary group of users.\n\n$ sudo chgrp users /home/smithj", "checktext": "", "vuldiscussion": "", "srg_requirement": "All Ubuntu 22.04 local interactive user home directories must be group-owned by the home directory owner\u2019s primary group.", "warnings": [{"general": "Due to OVAL limitation, this rule can report a false negative in a\nspecific situation where two interactive users swap the group-ownership\nof their respective home directories."}], "conflicts": [], "requires": [], "policy_specific_content": {"stig": {"srg_requirement": "All Ubuntu 22.04 local interactive user home directories must be group-owned by the home directory owner's primary group.", "vuldiscussion": "If the Group Identifier (GID) of a local interactive users home directory is not the same as the primary GID of the user, this would allow unauthorized access to the users files, and users that share the same group may not be able to access files that they legitimately should.", "checktext": "Verify the assigned home directory of all local interactive users is group-owned by that user's primary GID with the following command:\n\nNote: This may miss local interactive users that have been assigned a privileged user identifier (UID). Evidence of interactive use may be obtained from a number of log files containing system logon information. The returned directory \"/home/wadea\" is used as an example.\n\n$ sudo ls -ld $(awk -F: '($3&gt;=1000)&&($7 !~ /nologin/){print $6}' /etc/passwd)\n\ndrwxr-x--- 2 wadea admin 4096 Jun 5 12:41 wadea\n\nCheck the user's primary group with the following command:\n\n$ sudo grep $(grep wadea /etc/passwd | awk -F: \u2018{print $4}') /etc/group\n\nadmin:x:250:wadea,jonesj,jacksons\n\nIf the user home directory referenced in \"/etc/passwd\" is not group-owned by that user's primary GID, this is a finding.", "fixtext": "Change the group owner of a local interactive user's home directory to the group found in \"/etc/passwd\". To change the group owner of a local interactive user's home directory, use the following command:\n\nNote: The example will be for the user \"wadea\", who has a home directory of \"/home/wadea\", and has a primary group of users.\n\n$ sudo chgrp users /home/wadea"}}, "platform": null, "platforms": [], "sce_metadata": {}, "inherited_platforms": [], "cpe_platform_names": [], "inherited_cpe_platform_names": [], "bash_conditional": null, "fixes": {}, "title": "All Interactive User Home Directories Must Be Group-Owned By The Primary Group", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/accounts/accounts-session/file_groupownership_home_directories/rule.yml", "template": null}