Local initialization files must be group-owned by the users primary group or root.

From SUSE Linux Enterprise Server v11 for System z Security Technical Implementation Guide

Part of GEN001870

Associated with: CCI-000225

SV-45153r1_rule Local initialization files must be group-owned by the users primary group or root.

Vulnerability discussion

Local initialization files are used to configure the user's shell environment upon login. Malicious modification of these files could compromise accounts upon logon.

Check content

Check user home directories for local initialization files group-owned by a group other than the user's primary group or root. Procedure: # ls –a / | grep “^\.” | awk '{if ((!($1=="."))&&(!($1==".."))) print}' | xargs ls –ld If any file is not group-owned by root or the user's primary GID, this is a finding.

Fix text

Change the group-owner of the local initialization file to the user's primary group, or root. # chgrp Procedure: for PWLINE in $(cut -d: -f4,6 /etc/passwd); do HOMEDIR=${PWLINE##*:}; GROUP=${PWLINE%%:*}; FILES=$(find ${HOMEDIR} ! -fstype nfs -type f -name '\.*'); for INIFILE in ${FILES}; do GID=$(stat -c %g ${INIFILE}); test "$GROUP" = "${GID}" || chgrp ${GROUP} ${INIFILE}; done; done

Pro Tips

Lavender hyperlinks in small type off to the right (of CSS class id, if you view the page source) point to globally unique URIs for each document and item. Copy the link location and paste anywhere you need to talk unambiguously about these things.

You can obtain data about documents and items in other formats. Simply provide an HTTP header Accept: text/turtle or Accept: application/rdf+xml.

Powered by sagemincer