Computer name disabled in System Preferences/Sharing

rcurran
Contributor

Just noticed on two recently imaged machines that I cannot change the computer name from the Sharing system preference, no matter which user I'm logged in as. Where you'd normally type is greyed out and the machines register in the JSS as "localhost".

Thanks in advance

RC

11 REPLIES 11

bbass
Contributor

We've seen this before when dealing with Configuration Profiles.

I believe the setting that caused this problem for us was Login Window -> Options -> Set computer name to computer record name.

Not sure if this is the case for you but I thought I'd throw it out there as a possibility.

rcurran
Contributor

Thank you for your response but it appears that I don't have that option specifically set in my config profile.

Best

RC

rcurran
Contributor

When I remove that login window profile however, and log out/log back in I am allowed to change the user name.

Best

jkosowski
New Contributor III

@rcurran "When I remove that login window profile however, and log out/log back in I am allowed to change the user name."

Yup. "Set computer name to computer record name" box was unchecked in my Login Window payload, and yet the Computer Name field on a given Mac was greyed out. Excluding that Mac from the profile and quitting/reopening System Preferences made Computer Name changeable.

Weird. But good call!

gskibum
Contributor III

Same thing happened to me while testing a login window Configuration Profile. I had the "Set computer name to computer record name" box unchecked, but I was still unable to change the name.

I removed the test box from the scope and sure enough I was then able to change the name.

BillHenke
New Contributor II

Same here. Turning off our config profile is not an option for us though as we need it for the other items. Why have a checkbox that doesn't do what it says it does? Am I missing something here?

gbyers
New Contributor III

Still seems to be an issue in Jamf Pro 10.1.1

pandrum
New Contributor III

Also seeing this behaviour...

gskibum
Contributor III

Yep I still see the behavior in 10.6.

ScottyBeach
Contributor

I’ve noticed this but I am able to reset the computer name to the JSS record name using Jamf Remote’s rename feature.

jamfmdm
New Contributor

We use script for changing Computer name. First you need to download Cocoadialog and push it to all machine and run the script. On our side we put everything in Self-Service.

here is the script that we use:

**#!/bin/sh

Set CocoaDialog Location

CD="/Path/to/CocoaDialog.app/Contents/MacOS/CocoaDialog"

CD_APP="/Library/CocoaDialog.app"
CD="$CD_APP/Contents/MacOS/CocoaDialog"

Dialog to enter the computer name and the create $COMPUTERNAME variable

rv=($($CD standard-inputbox --title "Computer Name" --no-newline --informative-text "Enter the computer name you wish to set"))
COMPUTERNAME=${rv[1]}

Set Hostname using variable created above

scutil --set HostName $COMPUTERNAME
scutil --set LocalHostName $COMPUTERNAME
scutil --set ComputerName $COMPUTERNAME
jamf recon

Dialog to confirm that the hostname was changed and what it was changed to.

tb=`$CD ok-msgbox --text "Computer Name Changed!"
--informative-text "The computer name has been changed to $COMPUTERNAME"
--no-newline --float`
if [ "$tb" == "1" ]; then
echo "User said OK"
elif [ "$tb" == "2" ]; then
echo "Canceling"
exit
fi**