OS X Computer Name and Local Host Name
Two Objective-C functions for reading a Mac's computer name and local host name out of the SCPreferences file. The docs say to lock the file first; I never could, and I suspect that's a root-only trick.
This post is for members only
Already have an account? Sign in.