Posted on 03-23-2022 03:10 AM
I am trying to run a "Mac-Renaming" Skript via Policy, but it shows me something like this in the policy log:
if i run the skript on the mac itself it works just fine, but as soon as I try to deploy it via Policy i get this error.
here is the Skript:
arr=( $(ls /users) )
sudo /usr/local/bin/jamf setcomputername -name "$year$substr"
sudo /usr/local/bin/jamf recon
can someone help me to find the issue?
Posted on 03-23-2022 04:24 AM
Change this line;
Posted on 03-23-2022 04:26 AM
I'd try changing #!bash/sh to either #!/bin/bash or #!/bin/sh