Skip to main content
Question

Renaming Machines and disable Computername-Field


Forum|alt.badge.img+4

Hi Folks,

how would you scriptbased rename machines and disable the Machinename-Box in the Sharinge-Pane?

Cheers,
Holger

----
Holger Bartels
Max-Planck-Institut for Biophysical Chemistry
IT & Elektronik Service
Am Faßberg 11
D-37077 Goettingen, Germany
phone: +49 (0)551 201-1398
e-mail: holger.bartels[at]mpibpc.mpg.de

5 replies

  • 0 replies
  • November 9, 2011

When you set the computer name in System Preferences -> Sharing, there are two things that get changed
in the OS: the Computer Name and Local Host Name. The Local Host Name is the same as the Computer Name
only it uses dashes instead of spaces.

Here's a command you can run to change the name of the machine. Change the words Enter Name Here, between
the quotes, to desired name:

name="Enter Name Here"
scutil --set ComputerName "$name"
scutil --set LocalHostName `echo "$name" | sed 's/ /-/g'`

Thank You,
Nick King | Analyst II | Macy*s System & Technology
Apple Certified Support Professional ?

151 West 34th Street, 17th Floor | New York, NY 10001
(: 212.494.1884 (Service Desk)
(: 212.494.2253 (Direct Line)
*: nick.king at macys.com


  • 0 replies
  • November 9, 2011

Also, what to you mean when you say "disable the machine name box"?

Thank You,
Nick King | Analyst II | Macy*s System & Technology
Apple Certified Support Professional ?

151 West 34th Street, 17th Floor | New York, NY 10001
(: 212.494.1884 (Service Desk)
(: 212.494.2253 (Direct Line)
*: nick.king at macys.com


Forum|alt.badge.img+18
  • Valued Contributor
  • 1007 replies
  • November 9, 2011

there is a MCX setting under login, Set computer name to computer record name

--
Todd Ness
Technology Consultant/Non-Windows Services
Americas Regional Delivery Engineering
HP Enterprise Services


Forum|alt.badge.img+17
  • Contributor
  • 352 replies
  • November 9, 2011

Hi Holger,

I am using MCX (Managed Preferences) to grey out Sharing Prefs
Pane'Computer Name section.
com.apple.loginwindow
System Level Enforced

UseComputerNameForComputerRecordName boolean FALSE

I have posted this script couple of weeks ago (see below 2 emails - second
one adds the cancel button). It lets you change the names using Self
Service. But you can tweak it to use it silently too. Its for AD
environment but you don't need to use that part of the script.

Date: Thu, 27 Oct 2011 12:20:35 +0000


Forum|alt.badge.img+4
  • Author
  • Contributor
  • 10 replies
  • November 10, 2011

Hi,

thanks, this is awesome!

Cheers,
Holger


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings