MacOS – What files are included in the /System/Library/LaunchAgents and /System/Library/LaunchDaemons

macosmdmSecurity

I bought a used MacBook recently and want to know if it has anything nonstandard like mdm, etc. I have many items invthese folders, such as com.apple.mdmclient.plist, com.apple.managedclient.plist, etc. although I see no signs of having mdm profiles. Is it standard to be included in /System/Library/LaunchAgents and /System/Library/LaunchDaemons?

It is Mojave’s 10.14.4 and I have erased the hardcover and reinstalled the OS.

Best Answer

On macOS any MDM enrollment is not hidden. You are prompted as part of device enrollment and even if you accept, the system preferences show the profile control visually always and clearly. If you have no profile entry in system preferences (check that it's not enabled and hidden by selecting Customize from the view menu - if you don't see it - you're not managed)

System Preferences - customize... view - with Profiles that indicate you may have an MDM profile installed

Enumeration of /S/L/LaunchAgents and LaunchDaemons can be done, but I wouldn’t waste any time once you wiped the drive and reinstalled the os.

On my Mac - there are 304 system launch agents and 339 system launch daemons - including the ones you mentioned. Those frameworks exist on all macOS installs to work with MDM and not to indicate your Mac is currently managed. Just that it could later become managed if you enroll it or approve device enrollment if Apple points your Mac to an MDM endpoint.

mac:~ me$ ls -la /System/Library/LaunchAgents | wc -l
     304
mac:~ me$ ls -la /System/Library/LaunchDaemons | wc -l
     339
mac:~ me$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.14.5
BuildVersion:   18F132
mac:~ me$ ls -la /System/Library/Launch* | egrep -i "mdm|managed"
-rw-r--r--    1 root  wheel   1525 Aug 20  2018 com.apple.ManagedClientAgent.agent.plist
-rw-r--r--    1 root  wheel    549 Aug 20  2018 com.apple.ManagedClientAgent.enrollagent.plist
-rw-r--r--    1 root  wheel   1458 Aug 20  2018 com.apple.mdmclient.agent.plist
-rw-r--r--    1 root  wheel    719 Aug 20  2018 com.apple.ManagedClient.cloudconfigurationd.plist
-rw-r--r--    1 root  wheel    516 Aug 20  2018 com.apple.ManagedClient.enroll.plist
-rw-r--r--    1 root  wheel    523 Aug 20  2018 com.apple.ManagedClient.plist
-rw-r--r--    1 root  wheel    645 Aug 20  2018 com.apple.ManagedClient.startup.plist
-rw-r--r--    1 root  wheel    792 Aug 20  2018 com.apple.mdmclient.daemon.plist
-rw-r--r--    1 root  wheel    578 Aug 20  2018 com.apple.mdmclient.daemon.runatboot.plist