Inconsistent Output with Guest User Directory Detection Script #45

Closed
opened 2026-01-19 18:29:01 +00:00 by michael · 1 comment
Owner

Originally created by @mani2care on GitHub.

Hi

While running a command to detect Guest user directories under /Users, I encountered inconsistent results.

Commands executed:

bash : /bin/ls /Users/ | /usr/bin/grep -c "Guest"
Issue:
The command returns 1
i did not have any user name like Guest and i have only the TempGuest the grep is not fetching the accuriet result with the user name.

Let me know if you need

i have tested with macOS sequoia 15.5 version.

Image
Originally created by @mani2care on GitHub. Hi While running a command to detect Guest user directories under /Users, I encountered inconsistent results. Commands executed: bash : /bin/ls /Users/ | /usr/bin/grep -c "Guest" Issue: The command returns 1 i did not have any user name like Guest and i have only the TempGuest the grep is not fetching the accuriet result with the user name. Let me know if you need i have tested with macOS sequoia 15.5 version. <img width="619" height="147" alt="Image" src="https://github.com/user-attachments/assets/ac817d27-9113-46a7-995b-4b348e0abd2e" />
Author
Owner

@brodjieski commented on GitHub:

Hello! This check is derived from the CIS benchmark and uses the method that they include. The team at CIS is going to review this rule and check and we will update accordingly when/if any changes are made.

@brodjieski commented on GitHub: Hello! This check is derived from the CIS benchmark and uses the method that they include. The team at CIS is going to review this rule and check and we will update accordingly when/if any changes are made.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: usnistgov/macos_security#45