Posted on 11-09-2011 05:46 AM
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
Posted on 11-09-2011 06:34 AM
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
Posted on 11-09-2011 07:39 AM
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
Posted on 11-09-2011 07:53 AM
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
Posted on 11-09-2011 11:21 AM
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
Posted on 11-10-2011 02:22 AM
Hi,
thanks, this is awesome!
Cheers,
Holger