JSS v9.6 Imaging - Failure to enroll when using Thunderbolt to Ethernet Adapter

spraguga
Contributor

? [D-006627] When restarting a computer that has been imaged using Casper Imaging, the computer fails to enroll if attempting to connect to the JSS via an Apple Thunderbolt to Ethernet Adapter

This seems like a pretty major bug. What's everyone doing for a work around?

2 ACCEPTED SOLUTIONS

CasperSally
Valued Contributor II

See my post here where i link to a script that enables the adapter

https://jamfnation.jamfsoftware.com/discussion.html?id=11797#respond

and then a script i run that waits until enrollment completes before moving on

View solution in original post

CasperSally
Valued Contributor II

@spraguga][/url - happy to help where I can. I miss the days when enrollment wasn't necessary and MCX just worked.

Below is the script that i adapted for our environment. Maybe it will help you. I took the forced enrollment out in our environment because we were having various issues, and it was just confusing the issue when working with support.

# Check to make sure the machine has enrolled before continuing
/bin/echo "Checking enrollment..."
until [ ! -f "/Library/Application Support/JAMF/FirstRun/Enroll/enroll.sh" ]
    do
        /bin/echo "Machine is not enrolled. Trying enrollment."

        # Attempt enrollment

        /Library/Application Support/JAMF/FirstRun/Enroll/enroll.sh

        # Test if enrollment completed, sleep and try again if not

        if [ ! -f "/Library/Application Support/JAMF/FirstRun/Enroll/enroll.sh" ]
            then
                break
            else 
                sleep 30
        fi
    done
/bin/echo "Enrollment complete"

Credit goes to John Kitzmiller - whole script here https://github.com/kitzy/MacDeploymentScripts/blob/master/postimagingconfig/usr/local/postImagingConfig/scripts/postImageConfig.sh

View solution in original post

10 REPLIES 10

CasperSally
Valued Contributor II

See my post here where i link to a script that enables the adapter

https://jamfnation.jamfsoftware.com/discussion.html?id=11797#respond

and then a script i run that waits until enrollment completes before moving on

spraguga
Contributor

@CasperSally Thank you for this! We are currently running v9.32 and not experiencing this. I'll take a look at the script!

CasperSally
Valued Contributor II

interesting. I definitely have the issue with 9.32, but I have post image scripts that were fighting enrollment timing wise.

Chris_Hafner
Valued Contributor II

+1 @CasperSally that should work just fine. We use slightly different yet similar method that's worked well for us on the last major deployment (9.5 I believe, we're 9.6 now)

spraguga
Contributor

@CasperSally OK seeing this on v9.61 now. How are you running this first before other scripts? By name starting with a "1" or "A" to go first "At Reboot".

CasperSally
Valued Contributor II

@spraguga - yes, I had to get creative with naming my at reboot post image scripts to make sure enable ethernet ran first, then verify enrollment goes after that, then the rest of my scripts are less important in order.

I still don't fully understand why JAMF wouldn't want to add both of those mechanisms (enable ethernet adapters, pause until enrollment finishes) into their workflow. When I asked about the ethernet adapter issue, I was told I'd have to login to every machine post image to get it to recognize the adapter. I sent them the 'enable ethernet adapter' script months ago as a work around, but it died there I guess, unfortunately.

The verify enrollment script I actually got off of git posted by a JAMF employee. go figure.

spraguga
Contributor

@CasperSally Thank you very much for your quick replies! It is very much appreciated!

OK, I'll try naming them 1, 2, etc.

- Also new with Yosemite is that you need to have admin rights to add new network interfaces on a base OS build. To get around this you need to plug the new interface in and restart. However, "Display Ethernet" doesn't activate so I'll have to add a local policy to run `networksetup -detectnewhardware` at login.

spraguga
Contributor

@CasperSally My computers are enrolling but not becoming managed since upgrading to v9.61. I'm going to have to add a `jamf manage` to the verify enrollment script. Testing continues....

CasperSally
Valued Contributor II

@spraguga][/url - happy to help where I can. I miss the days when enrollment wasn't necessary and MCX just worked.

Below is the script that i adapted for our environment. Maybe it will help you. I took the forced enrollment out in our environment because we were having various issues, and it was just confusing the issue when working with support.

# Check to make sure the machine has enrolled before continuing
/bin/echo "Checking enrollment..."
until [ ! -f "/Library/Application Support/JAMF/FirstRun/Enroll/enroll.sh" ]
    do
        /bin/echo "Machine is not enrolled. Trying enrollment."

        # Attempt enrollment

        /Library/Application Support/JAMF/FirstRun/Enroll/enroll.sh

        # Test if enrollment completed, sleep and try again if not

        if [ ! -f "/Library/Application Support/JAMF/FirstRun/Enroll/enroll.sh" ]
            then
                break
            else 
                sleep 30
        fi
    done
/bin/echo "Enrollment complete"

Credit goes to John Kitzmiller - whole script here https://github.com/kitzy/MacDeploymentScripts/blob/master/postimagingconfig/usr/local/postImagingConfig/scripts/postImageConfig.sh

spraguga
Contributor

@CasperSally Yeah, I was running a `jamf manage` to accomplish the same thing but I noticed it wasn't clearing the /FirstRun/ folder out. Thanks for the update! Working perfectly now!