Can someone help explain what's going on with a script we're working with?
Preface: we're required to use deepfreeze with our Mac labs, and need to supply the DF license key to each machine. Deepfreeze CLI requires that you pass the deepfreeze password to it to set the license.
#!/bin/bash -v echo 2>$1 echo "preparing to run script." echo *$studentmachinepw* | sudo -S /usr/bin/expect -d -c "spawn /usr/local/bin/deepfreeze license --set *$licensekey*; expect :; send $dfPassword ; expect eof; exit"
This works as expected when run locally on the machine. I've turned on as much logging as I could to get some answers (I currently have the DF password and license key hard coded to reduce variables). here's the result from the Jamf remote log, every time:
Sending Wake On LAN command... Opening SSH Connection to x.x.x.x... Authenticating... Successfully authenticated. Verifying Computer's Identity... The MAC Address has been verified. Checking Operating System Version... Running Mac OS X 10.14.4 (18E2034) Verifying /usr/local/jamf/bin/jamf... /usr/local/bin/jamf is (10.14.1-t1564684715) not the current version (10.13.0-t1559772983). Verifying /usr/sbin/jamf... /usr/sbin/jamf does not exist. Downloading /usr/local/jamf/bin/jamf from Jamf Pro Server... Moving jamf binary to /usr/local/jamf/bin/jamf... Created the jamf binary directory /usr/local/jamf/bin. Moving jamf binary to /usr/local/jamf/bin/jamf... Moved the JAMF CLI Binary to /usr/local/jamf/bin/jamf. Creating symlink /usr/local/bin/jamf... Enabling /usr/local/jamf/bin/jamf... Enabled the JAMF CLI Binary. Verifying /Library/Preferences/com.jamfsoftware.jamf.plist... Preparing Policy... -bash: !!!Jamfadmin Password!!!: command not found MAC-SPARE-09:~ Jamfadmin$
The log never shows any more than this. For some reason it's printing the Jamf admin randomized password every time and not even showing any of the echoed text. Can someone help me understand what's going on?