4.2.5 Ensure all entries in /etc/hosts.equiv are removed

Information

This process removes all entries from the /etc/hosts.equiv file.

The /etc/hosts.equiv file can be used to circumvent normal login or change control procedures. The existence of this file, with the relevant entries, can allow remote user access to a system bypassing local user and password authentication. Unless required all entries will be removed from this file.

Solution

Remove all entries from the /etc/hosts.equiv file:

sed '/^s*$/d; s/^(s*[^#].*)/#1/' /etc/hosts.equiv > /etc/hosts.equiv.work
mv hosts.equiv.work hosts.equiv
chown root:system /etc/hosts.equiv
chmod 644 /etc/hosts.equiv

Note: the above command removes blank lines and comments out any non commented entries.

See Also

https://workbench.cisecurity.org/benchmarks/10385

Item Details

Category: ACCESS CONTROL, MEDIA PROTECTION

References: 800-53|AC-3, 800-53|AC-5, 800-53|AC-6, 800-53|MP-2, CSCv7|14.6

Plugin: Unix

Control ID: c90febc8e7014338fa9d81e9260931483f7e73e72bc2d9279ad80756eff14bc8