Currently we use this script to assign whatever user logs into their laptop it reaches out to jamf and assigns the student to that specific computer.
#!/bin/bash
lastUser=`defaults read /Library/Preferences/com.apple.loginwindow lastUserName`
jamf recon -endUsername $lastUser
Now I want to see if it is possible to blank out the user that is assigned to that computer instead of going to each computer and editing each student out for the new school year.
I have tried to see if this script would work but not thing seems to work.
#!/bin/bash
# Set the user details to blank using Jamf commands
/usr/local/bin/jamf recon -username " "
/usr/local/bin/jamf recon -realname " "
/usr/local/bin/jamf recon -email " "
/usr/local/bin/jamf recon -department " "
Please help as I know there must be a solution out there.