macOSUpgrade icon indicating copy to clipboard operation
macOSUpgrade copied to clipboard

automated re-enrollment support with --installpackage

Open cubandave opened this issue 5 years ago • 8 comments

Hey kc9wwh,

I've made a new tool to automate re-enrollment for not DEP devices when using your script.

Would be super cool to put code into your master. Check it out. I sent you a video on slack as a ealry demo. I'll make a video demo tomorrow.

https://github.com/cubandave/re-enroll-mac-into-jamf-after-wipe

cubandave avatar Jun 21 '19 04:06 cubandave

I've now fully validated my own code with Travis CI. Including my own Project. That thing is awesome!

cubandave avatar Jun 22 '19 11:06 cubandave

Hi @cubandave, Thank you for your contribution.

It seems that your patches strongly depend on re-enroll-mac-into-jamf-after-wipe.

This project is focused on upgrading only. However, I am aware that this project is poorly extensible.

I think that it is possible to apply changes that accepts a package path to a jamf script argument like https://github.com/kc9wwh/macOSUpgrade/pull/110. In doing so, I would say each processes will be loosely coupled.

kenchan0130 avatar Jun 25 '19 05:06 kenchan0130

@taniguti There is also about this, so how about adding another PR that changes the path of package to pass to the argument 10 of jamf script?

kenchan0130 avatar Jun 25 '19 07:06 kenchan0130

If this end result of enrollment was desired, this would accomplish the same goal:

# Create required directories
mkdir -p /usr/local/jamf/bin /usr/local/bin

# Move the jamf binary
mv /tmp/jamf /usr/local/jamf/bin

# Make the jamf binary executable
chmod +x /usr/local/jamf/bin/jamf

# Create a symbolic link
ln -s /usr/local/jamf/bin/jamf /usr/local/bin

# Create a configuration file
jamf createConf -k -url enrollmentURL

# Enroll the computer
jamf enroll -invitation invitationID

ryangball avatar Jun 25 '19 10:06 ryangball

Hey @kenchan0130 I can make the changes to only have it installPackage with a parameter from $10. I’ll re work the re-enroll project to make it create the package first and put the package in a static location.

@ryangball that’s exactly how the re-enroll project does that.

cubandave avatar Jun 25 '19 11:06 cubandave

I agree with @kenchan0130 . To use $10 for additional package for erase option sounds good.

taniguti avatar Jun 26 '19 13:06 taniguti

Cool. I’ll make a new pull request soon with that setup. Error checking and all.

cubandave avatar Jun 26 '19 17:06 cubandave

@cubandave I am trying to do actions at https://github.com/kc9wwh/macOSUpgrade/pull/121 and https://github.com/kc9wwh/macOSUpgrade/pull/122.

kenchan0130 avatar Jun 28 '19 08:06 kenchan0130