Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We do not use Open Directory at my company but I deploy OSX images using DeployStudio. We use an inventory system that automatically updates, but users keep on changing their computer's name in the Sharing preference pane, causing our naming convention to get messed up.

Is there a way to either disable the Sharing preference pane or at least only allow some users to access it, even if others are admins?

share|improve this question
    
As just a side note: There is no 100% way to prevent this, even if the user is an admin. I would agree that @slhck's method is the best, but it's still reversible to admins on the local Mac – Canadian Luke Feb 28 '13 at 18:59
up vote 0 down vote accepted

If you're up for it, you can remove the Sharing preference pane by simply renaming it.

/System/Library/PreferencePanes/SharingPref.prefPane

For example, rename it to SharingPref without an extension. You need admin privileges for that, and of course it's reversible if the user knows where to look, but if you have to fight against users who just "want to change their computer name", I guess that'll do?

Before and after:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .