All global initialization files must be owned by root.

From SUSE Linux Enterprise Server v11 for System z

Part of GEN001740

Associated with: CCI-000225

SV-45104r1_rule All global initialization files must be owned by root.

Vulnerability discussion

Global initialization files are used to configure the user's shell environment upon login. Malicious modification of these files could compromise accounts upon logon. Failure to give ownership of sensitive files or utilities to root or bin provides the designated owner and unauthorized users with the potential to access sensitive information or change the system configuration which could weaken the system's security posture.

Check content

Check the ownership of global initialization files. Procedure: # ls -lL /etc/bash.bashrc /etc/csh.cshrc /etc/csh.login /etc/environment /etc/ksh.kshrc /etc/profile /etc/profile.d/* /etc/zshrc This should show information for each file. Examine to ensure the owner is always root or: # ls /etc/bash.bashrc /etc/csh.cshrc /etc/csh.login /etc/environment /etc/ksh.kshrc /etc/profile /etc/profile.d/* /etc/zshrc 2>/dev/null|xargs stat -L -c %U:%n|egrep -v "^root" This will show you only the owner and filename of files not owned by root. If any global initialization file is not owned by root, this is a finding.

Fix text

Change the ownership of global initialization files with incorrect ownership. Procedure: # chown root or: # ls /etc/bashrc /etc/csh.cshrc /etc/csh.login /etc/environment /etc/ksh.kshrc /etc/profile /etc/profile.d/* /etc/zshrc 2>/dev/null|xargs stat -L -c %U:%n|egrep -v "^root"|cut -d: -f2|xargs chown root will set the owner of all files not currently owned by root to root.

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