Composer, Creating a package that will work on different usernames

ckeats
New Contributor II

I'm still new to Casper Composer but i noticed that if i made an adjustment to something in my user folder it wants to add that user folder name to the machine that runs that package.

Composer Snapshot Example: /User/Composercomputerusername/Desktop/test.img

Is there a way to make it install that package i built into the computers user folder and not the one that was created on the composer machine? Not sure if its an adjustment i need to make on the user computers end or the composer setup end. Also any other tips for composer is appreciated, so far i got most of the basics figured out.

Each one of my companies computers all have different usernames, /Users/tom/, /Users/frank/.....etc.

2 REPLIES 2

mm2270
Legendary Contributor III

Jamf Pro will do this for you, but your package will need to be built as a DMG, not a PKG format. Once done, you can enable the FEU (Fill Existing Users) option on the package in Casper Admin. When deploying in a policy, make sure the FEU option is enabled and when it installs, it will use your user folder as a wildcard to fill any user folders it finds in the same path.
IOW, if you capture something in /Users/admin/Library/Preferences/, when it gets pushed, it really deploys into /Users/<any user homes it sees here>/Library/Preferences/

If you wanted to only affect one home directory, say the logged in user, then you would need to instead move any files/folders you capture into a place like /private/tmp/, then pull them into Composer. Then create a postinstall script to add to Composer that would find the current logged in user's home path and move the files it installed into /tmp/ into their respective locations to the current user's home.

The latter is definitely more work, but it has the advantage of being able to use a package install instead of a DMG, which is more portable. And you have more flexibility to place the files where you want, or even use some script logic, like only moving them into place if the file doesn't already exist.

ckeats
New Contributor II

Yes that worked perfect. Thank you for explaining it in good details.