Wildcard for device assigned user macbooks not logged in user

Malcolm
Contributor II

To the best of knowledge
$3 is the logged in user
and $USERNAME should be the assigned user, as per how it functions for iPad, but when scripting, $USERNAME ends up being blank for MacBooks or the logged in user. (I cant recall).

and $USER is a standard in macOS which is the logged in user.

It seems like there is no way to use the same standards against scripts for macOS as per what is listed here: https://docs.jamf.com/10.25.0/jamf-pro/administrator-guide/Apple_Education_Support_Settings.html
$USERNAME
$FULLNAME
$REALNAME
$EMAIL
$PHONE
$POSITION
$EXTENSIONATTRIBUTE_<#>

assigning any of the $USERNAME parameter definitely doesn't work. Although I cannot confirm for the others mentioned above, although $SERIALNUMBER may work... and I cannot find a list of the extension attribute # to attempt to find the specific field listing the Username assigned to the device.

Scripting against the logged in user, has its caveats, such as, if the script runs while not logged in, or if run too quickly upon login, can result in being blank.

the desire for this is to bind our macbooks to AD, prior to user login, so that naming and binding takes place well before the user logs in.

0 REPLIES 0