6.2.13 Ensure users' .netrc Files are not group or world accessible

Information

While the system administrator can establish secure permissions for users' .netrc files, the
users can easily override these.

Rationale:

.netrcfiles may contain unencrypted passwords that may be used to attack other systems.

Solution

Making global modifications to users' files without alerting the user community can result
in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring
policy be established to report user .netrc file permissions and determine the action to be
taken in accordance with site policy.

Notes:

While the complete removal of .netrc files is recommended if any are required on the
system secure permissions must be applied.

On some distributions the /sbin/nologin should be replaced with /usr/sbin/nologin.

See Also

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