Skip to main content
Question

Computer Name (Workflow Question)


Forum|alt.badge.img+4

I have a workflow question.

Basically what we are doing is building manually, then using a quickadd package to enroll the device. Right now I have the techs set the HostName through Sharing, and then running the quickadd package.

What I would like to do is this.

  1. Run the quickadd package
  2. Run a policy in Self Service to set the computer name/hostname (scutil script, anyone?)
  3. Then in the same policy, install base software, which then kicks off a restart to add admin account, bind to ad, encrypt, etc.

My question is...how do I get the name to update in the JSS to the then renamed computer? Or will it update automatically?

5 replies

stevewood
Forum|alt.badge.img+35
  • Employee
  • 1797 replies
  • January 25, 2017

@Pacers31Colts18 simply doing jamf recon after changing the name will update the JSS. So something like this:

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

Of course you'll need the rest of the logic to ask for the computer name, etc.


Forum|alt.badge.img+3
  • New Contributor
  • 15 replies
  • January 25, 2017
scutil --set ComputerName $newCompName scutil --set HostName $newCompName scutil --set LocalHostName $newCompName jamf recon

@stevewood would this do the same thing?

jamf setcomputername -name $newCompName
jamf recon


stevewood
Forum|alt.badge.img+35
  • Employee
  • 1797 replies
  • January 25, 2017

@Volker Yes, that would. I'm just old school and use scutil for whatever reason. And the fact that he mentioned it in his post was why I did it that way.


mvu
Forum|alt.badge.img+20
  • Jamf Heroes
  • 872 replies
  • January 25, 2017

What I did in the past was add a preflight script inside the QuickAdd package that will name the computer. That way the techs only had one package to install. Of course, we had to create a package for all the various computer names.


Forum|alt.badge.img+4

Thanks guys.

What I have it doing is this now:

  1. Build
  2. Run QuickAdd Package
  3. Kick off Base Software Configuration, this then installs the software. At the very end (after it installs Command Line Tools), it will prompt the tech to enter the computer name. Once finished...it reboots, joins to the domain. On login, FV kicks off.

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