AppleJason

Q: Can't change computername (but can change hostname)

My trusted client computers (all 10.6.8) have their computername (prefs->sharing) greyed out.  However, the hostname (edit button) can be changed. 

 

I can't find any managed preference for this in WGM.  Can anyone tell me how I can change the computer name?

 

Thank you!

iMac, Mac OS X (10.6.8), i5 with Thunderbolt

Posted on Dec 8, 2011 7:03 PM

Close

Q: Can't change computername (but can change hostname)

  • All replies
  • Helpful answers

  • by piperspace,Helpful

    piperspace piperspace Dec 10, 2011 3:37 PM in response to AppleJason
    Level 2 (305 points)
    Dec 10, 2011 3:37 PM in response to AppleJason

    Try 'sudo scutil -set computrname thename.thedomainname' from Terminal. Then reboot.

     

    Also, we found iit necessary to disable IPv6. Otherwise our macs kept renaming themselves every couple of days.

     

    It appears to be a bug.

  • by AppleJason,Solvedanswer

    AppleJason AppleJason Dec 11, 2011 7:28 PM in response to piperspace
    Level 1 (13 points)
    Dec 11, 2011 7:28 PM in response to piperspace

    Yes thank you for the lead, this works, but the correct command turns out to be:

     

    >sudo scutil --set ComputerName thecomputername

     

    (case matters in "ComputerName", and you need two dashes before "set".)

     

    And in my case, I don't want the domain name in the "computername", as the DNS server takes care of appending (expand-hosts) the domain name when it's not there.

     

    Thank you!!!

  • by Matt Crawford2,

    Matt Crawford2 Matt Crawford2 Sep 18, 2014 1:50 PM in response to AppleJason
    Level 1 (101 points)
    Mac OS X
    Sep 18, 2014 1:50 PM in response to AppleJason

    This fixed up the same problem for me in Mavericks.