Postinstall.sh errors

croninm
New Contributor

When the postinstall.sh runs it fails every time and loops. Below are the error messages we receive:

Script result: /Library/Application Support/JAMF/tmp/postImaging.sh: line 8: /usr/sbin/jamf: No such file or directory
/Library/Application Support/JAMF/tmp/postImaging.sh: line 19: /usr/sbin/jamf: No such file or directory
Starting...
Stopped ARD Agent.
Done.
Starting...
Activated Remote Management.
Stopped ARD Agent.
admin: Set user remote control privileges.
admin: Set user remote access.
Done.
Starting...
Setting allow all users to NO.
Done.
ln: /Applications/Utilities//Directory Utility.app: File exists
ln: /Applications/Utilities//Network Utility.app: File exists
Software Update Tool
Copyright 2002-2012 Apple Inc.

Finding available software
Software Update found the following new or updated software:
031-07832-3.1
HP Printer Software Update (3.1), 144634K [recommended]
OSXUpd10.10.5-10.10.5
OS X Update (10.10.5), 795798K [recommended] [restart]
* iTunesX-12.3.2
iTunes (12.3.2), 241328K [recommended]
/Library/Application Support/JAMF/tmp/postImaging.sh: line 90: /usr/sbin/jamf: No such file or directory
/Library/Application Support/JAMF/tmp/postImaging.sh: line 91: /usr/sbin/jamf: No such file or directory
/Library/Application Support/JAMF/tmp/postImaging.sh: line 93: /usr/sbin/jamf: No such file or directory
/Library/Application Support/JAMF/tmp/postImaging.sh: line 100: /usr/sbin/jamf: No such file or directory
/Library/Application Support/JAMF/tmp/postImaging.sh: line 106: /usr/sbin/jamf: No such file or directory

Driving us crazy because our machines are not binding or running most of the post install tasks anymore.

3 ACCEPTED SOLUTIONS

davidacland
Honored Contributor II

Hi,

The jamf binary moved in one of the recent versions to be compatible with SIP. It's now in /usr/local/bin/jamf.

What version of JSS and client OSes are you seeing this on?

View solution in original post

flyboy
Contributor

What version is your JSS and what version of Mac OS is this happening on? That's the older path for the jamf binary. When El Capitan support was included in 9.8.1, I believe, the jamf binary was moved per System Integrity Protection. The binary gets moved to /usr/local/bin/jamf.

View solution in original post

stevewood
Honored Contributor II
Honored Contributor II

@croninm You can add a little bit to your code to check fro the jamf binary position:

# check for jamf binary
/bin/echo "Checking for JAMF binary"
/bin/date


 if [[ "$jamf_binary" == "" ]] && [[ -e "/usr/sbin/jamf" ]] && [[ ! -e "/usr/local/bin/jamf" ]]; then
    jamf_binary="/usr/sbin/jamf"
 elif [[ "$jamf_binary" == "" ]] && [[ ! -e "/usr/sbin/jamf" ]] && [[ -e "/usr/local/bin/jamf" ]]; then
    jamf_binary="/usr/local/bin/jamf"
 elif [[ "$jamf_binary" == "" ]] && [[ -e "/usr/sbin/jamf" ]] && [[ -e "/usr/local/bin/jamf" ]]; then
    jamf_binary="/usr/local/bin/jamf"
 fi

This code is courtesy of @rtrouton .

View solution in original post

5 REPLIES 5

davidacland
Honored Contributor II

Hi,

The jamf binary moved in one of the recent versions to be compatible with SIP. It's now in /usr/local/bin/jamf.

What version of JSS and client OSes are you seeing this on?

flyboy
Contributor

What version is your JSS and what version of Mac OS is this happening on? That's the older path for the jamf binary. When El Capitan support was included in 9.8.1, I believe, the jamf binary was moved per System Integrity Protection. The binary gets moved to /usr/local/bin/jamf.

stevewood
Honored Contributor II
Honored Contributor II

@croninm You can add a little bit to your code to check fro the jamf binary position:

# check for jamf binary
/bin/echo "Checking for JAMF binary"
/bin/date


 if [[ "$jamf_binary" == "" ]] && [[ -e "/usr/sbin/jamf" ]] && [[ ! -e "/usr/local/bin/jamf" ]]; then
    jamf_binary="/usr/sbin/jamf"
 elif [[ "$jamf_binary" == "" ]] && [[ ! -e "/usr/sbin/jamf" ]] && [[ -e "/usr/local/bin/jamf" ]]; then
    jamf_binary="/usr/local/bin/jamf"
 elif [[ "$jamf_binary" == "" ]] && [[ -e "/usr/sbin/jamf" ]] && [[ -e "/usr/local/bin/jamf" ]]; then
    jamf_binary="/usr/local/bin/jamf"
 fi

This code is courtesy of @rtrouton .

croninm
New Contributor

We are running 9.82. I knew it was something stupid like this I just couldn't find the root. Thanks. Testing it out now. We were seeing it on 10.10 and 10.11.

croninm
New Contributor

Thanks guys. Totally worked. We are up and running.