IMPORTANT ANNOUNCEMENT: On May 6, 2024, Carbon Black User eXchange (UeX) and Case Management will move to a new platform!
The Community will be in read-only mode starting April 19th, 7:00 AM PDT. Check out the blog post!
You will still be able to use the case portal to create and interact with your support cases until the transition, view more information here!

Carbon Black Cloud: How To Check Hostname History for the Last Seven Days (macOS)

Carbon Black Cloud: How To Check Hostname History for the Last Seven Days (macOS)

Environment

  • Carbon Black Cloud Sensor: All Versions
  • Apple macOS: All Supported Versions

Objective

Explain how to search system/kernel logs for changes to hostname on a Mac device/endpoint

Resolution

  1. Connect to the desired computer
  2. Launch the Terminal
  3. Run the following command to see any changes in the past week
    log show --style syslog --info --last <TimePeriod m|h|d> | grep 'setting hostname'
  4. Review the output for any changes

Additional Notes

  • Device name retrieval on macOS is currently done using 'sysctl kern.hostname'
  • The above command shows events that occurred within the given time relative to the end of the log archive
  • Time may be specified as minutes, hours, or days
  • Time is assumed in seconds unless specified
  • The parameter <TimePeriod> should be entered as follows for the desired time-frames
    --last <TimePeriod m|h|d>
    
    Last 30 days
    --last 30d
    
    Last 7 days
    --last 7d
    
    Last 24 hours
    --last 24h
    
    Last 60 minutes
    --last 60m
  • The Cb Defense sensor does not control or manage a device's hostname and only observes and reports on such changes
  • The Sensor reacts to the change by reporting the most recent device name and exposes the issue as an Administrator reviews Events in the Cb Defense Web Console
  • If you see the wrong hostname displayed for events on one device, run the command above to check for changes and you can verify within DHCP, JAMF, or similar tools used in your environment to manage hostnames

Related Content


Was this article helpful? Yes No
100% helpful (1/1)
Article Information
Author:
Creation Date:
‎01-04-2018
Views:
2564
Contributors