Skip to main content
Question

Prestage Enrollment Prompt for Computer Name Druing Setup Assistant or at Login Screen

  • September 25, 2018
  • 28 replies
  • 55 views

Show first post

28 replies

Forum|alt.badge.img+1
  • New Contributor
  • March 4, 2022

If you're just looking for an easy way to set the computer name during Setup Assistant, take a look at my bash script that uses AppleScript to popup a dialog box to set the computer name. You'll need to attach this script to a policy that runs on the enrollment trigger. Then, when in Setup Assistant, stay at the Time Zone selection screen until you see the computer name dialog pop up (it can take 30 seconds or so).

Also, if you want to bind to AD just add some dsconfigad code to the bottom of script.

https://github.com/cwmcbrewster/Jamf_Scripts/blob/master/Computer_Enrollment_PromptForName.sh


Hey @cbrewer -- New to Jamf myself and was wondering if this can be modified to simply function after the enrollment process thereby affecting the computer name for those that aren't worried about timing or binding to AD?  


Forum|alt.badge.img+1
  • New Contributor
  • March 4, 2022

Hey @cbrewer -- New to Jamf myself and was wondering if this can be modified to simply function after the enrollment process thereby affecting the computer name for those that aren't worried about timing or binding to AD?  


Most of our deployments are Zero Touch so I can't guarantee that people will wait on the Time Zone selection for 30-60sec. I have been trying to find a solution where the user will be prompted to enter their name soon after account creation, thereby changing the computer name. 


Forum|alt.badge.img
  • New Contributor
  • April 20, 2022

@csanche3x Is the policy running successfully? What do the policy logs say? Are you waiting at the time zone setup assistant screen?

Do you have "Automatically install a Privacy Preferences Policy Control profile (macOS 10.14 or later)" enabled in Settings > Computer Management > Security?


@cbrewer Hi, thank you so much for the script and continued support. Apologies, if this is a basic question, but I have been getting the following error when running the script.

Executing Policy Computer Name
Running script Computer Name...
Script exit code: 0
Script result: Logged in user is not _mbsetupuser. Exiting...

I've tried searching the error, but I get no relevant information. Any advice or suggestions?

Thank you!