Posted on 07-12-2018 07:03 AM
I'm running the following script which Writes to loginwindow and sets the text
I get the above error mesage
Sorry for the 1st post, it wasn't quite right... any ideas very welcome
Here's the UPDATED script:
>>
apiUser="xxx"
apiPass="xxx"
jssURL="https://xxxxxx:8443"
compName=$(scutil --get ComputerName)
section="department"
LocationData=$(curl -H "Accept: text/xml" -sfku "${apiUser}:${apiPass}" "${jssURL}/JSSResource/computers/macaddress/$(networksetup -getmacaddress en0 | awk '{print $3}')/subset/location" | xmllint --format - 2>/dev/null | grep "<${section}" | awk -F'>|<' '{print $3}')
sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "$LocationData"
<<
Posted on 07-12-2018 08:48 AM
"$dept" doesn't appear to be set. This is passing an empty variable to defaults.