os_sudo_timeout_configure Configure Sudo Timeout Period to $ODV
NIST macOS Security Compliance Project Sequoia Guidance, Revision 4.0 (be5491f)
All changes in this version
All changes in this version
Title
Configure Sudo Timeout Period to $ODV
Control
/usr/bin/sudo /usr/bin/sudo -V | /usr/bin/grep -c "Authentication timestamp timeout: $ODV.0 minutes"
Discussion
The file /etc/sudoers _MUST_ include a timestamp_timeout of $ODV.
Fix
[source,bash]
----
/usr/bin/find /etc/sudoers* -type f -exec sed -i '' '/timestamp_timeout/d' '{}' \;
/bin/echo "Defaults timestamp_timeout=$ODV" >> /etc/sudoers.d/mscp
----