MagerValp / AutoDMG

Create deployable system images from OS X installer
1.22k stars 117 forks source link

Feature request - Customise User Template during build #244

Closed jelockwood closed 4 years ago

jelockwood commented 4 years ago

Description of issue

Apple are removing many options administrators have previously used to build and automate the configuration of Macs. Whilst in general DEP and MDM is a good approach that should be used it does not cover all circumstances or requirements and frankly I would say Apple are necessarily making like difficult an unpleasant to the level that it is arguably worse than Windows or Linux. :(

Apart from removing the --volume option on the startosinstall command another casualty is the ability to modify the /System/Library/User Template/ folder in Catalina during installation. Hypothetically one might be able to modify it after installation by disabling SIP and then modifying it but by then at least one user account will have been create using the 'bad' template.

I am therefore suggesting the following as a possible solution you could incorporate in to AutoDMG.

As far as I can see AutoDMG builds a ready to run i.e. already installed copy of macOS by copying items from the BaseSystem.dmg and the InstallESD.dmg files inside the Install macOS app.

The standard User Template folder is in the BaseSystem.dmg. This is a read-only disk image otherwise I might have considered modifying the contents before running AutoDMG. Another alternative approach would involve restoring an AutoDMG image, then booting in to recovery mode to turn SIP off, then modifying the volume, then turning SIP back on which could not be all automated.

It would seem a possible solution would be to add the ability to AutoDMG to either to be told to copy a different User Template source instead or to modify it after copying but before the Image is converted to read-only. The later could be done by allowing an additional stage which runs an additional script. The script could be passed a parameter which provides the path to the mounted disk image prior to conversion so the script could write to it. Either of these approaches would then be automated during the AutoDMG build process and immediately active on restoring the resulting image.

arubdesu commented 4 years ago

In Catalina the User Template has a new location https://derflounder.wordpress.com/2019/10/14/the-macos-user-template-directories-have-a-new-filesystem-location-on-macos-catalina/ Are you sure you still need this feature?

MagerValp commented 4 years ago

Apple is moving in a direction that makes AutoDMG less and less useful for every day that passes. I will not be adding any new features to handle deployment scenarios.