BaselineWatch
Desk

os_nfsd_disable Disable Network File System Service

NIST macOS Security Compliance Project Sequoia Guidance, Revision 4.0 (be5491f)
All changes in this version
first version loaded macOS

Title

Disable Network File System Service

Control

isDisabled=$(/sbin/nfsd status | /usr/bin/awk '/nfsd service/ {print $NF}')
if [[ "$isDisabled" == "disabled" ]] && [[ -z $(/usr/bin/pgrep nfsd) ]]; then
echo "pass"
else
echo "fail"
fi

Discussion

Support for Network File Systems (NFS) services is non-essential and, therefore, _MUST_ be disabled.

Related controls

ac-17, ac-3

Fix

[source,bash]
----
/bin/launchctl disable system/com.apple.nfsd
/bin/rm -rf /etc/exports
----
The system may need to be restarted for the update to take effect.