Posted on 08-14-2018 06:29 AM
Pardon my if I posted something that was already mentioned. We are new to jamf (In about 4 months). I was wondering if anyone had a way through a script or something else that post enrollment a dialog would pop up and ask for the following inforomation "Which normally needs to be entered on the jamf server, under user and location of the computer object".
1. Username
2. Department (Preferably a dropdown with the departments in the jamf server).
Posted on 08-14-2018 08:18 AM
There are a lot of methods to get input from the users. Search for CocoaDialog and JamfHelper and you'll come back with lots of examples of both.
To actually send the Jamf Pro Server the username and department you can use recon.
jamf help recon
Usage: jamf recon
-saveFormTo Saves the contents of the HTTP form to a file
The following options allow you to specify inventory information for the computer:
-assetTag The asset tag of the computer
-endUsername The user name of the primary user
-realname The real name of the primary user
-email The email address of the primary user
-position The position (job title) of the primary user
-building The text representation of a building in the jSS
-department The text representation of a department in the JSS
-phone The phone number of the primary user
-room The room that the computer is in
-ldapServerID The JSS ID of the LDAP server to which the primary user belongs
-userID The user ID of the primary user's account in the LDAP server.
The following options allow you to update the computer's management account information in the JSS:
-sshUsername A username that is used to connect to the computer over SSH.
-sshPassword A password that is used to connect to the computer over SSH.
-sshPasshash A hashed copy of a password that is used to connect to the computer over SSH
So to get the username to the Jamf Pro Server you'd do this:
name="your_name"
dept="Human Resources"
jamf recon -endUserName "$name" -department "$dept"
Posted on 08-14-2018 08:21 AM
Also, if your departments are on different subnets or in different IP ranges, you can use "Network Segments" setting in the Jamf Pro Server to specify those network segments and use the "Override Department in Inventory" checkbox to set the department automatically based on the IP.
Posted on 08-14-2018 12:04 PM
Thank You for the response I will toy around with this.
Posted on 08-14-2018 12:16 PM
I'm doing something similar. https://www.jamf.com/jamf-nation/discussions/28943/applescript-list-in-shell-script
as a part of our deployment, I prompt the user (a member of our tech team) for a comp name, set the computer name/host name, then prompt for a machine type. If it's a student (or shared machine) it auto-sets the department using the recon -department switch that @ryan.ball mentioned earlier. if it's a faculty/staff machine, it prompts for the username, then auto populates user/location info for that device based on our AD mappings.