Quickadd packge changes?

jwojda
Valued Contributor II

I vaguely recall that back in the day when I created a quickadd package I was able to go in to the package, and pull the script out. That script had the encrypted password and commands to create the new account. With that I could take the info and paste into another script that would handle it (rather than relying on the packages). It doens't seem to be that way anymore. Is the old way defunct? is there a way to do it still that way?

4 REPLIES 4

ernstcs
Contributor III

Yeah, I'm probably saying this wrong, but the package is flattened so you can't browse it's contents.

The way I've done this is with Casper Imaging. Image a box up, use the Accounts tab to create what you want (you can't set as hidden and some other things), and don't reboot to Macintosh HD. You should be able to dig into the /Library/Application Support/JAMF/FirstRun/PostInstall/postinstall.sh after Imaging finishes. You can also get the rest of the switches from jamf help createAccount.

The only thing I really get out of the scripts there are the hashed password. My usual command is:

/usr/sbin/jamf createAccount -username '<username>' -realname '<realname>' -passhash '<passwordhash>' -home '/private/var/<username>' -admin -hiddenUser -secureSSH

donmontalvo
Esteemed Contributor III

Yea, this kind'a whacked our ability to create a limited hands-off Casper agent.

Bummer...at some point I'll need to open a ticket to get a current supported method to create a client that ONLY pulls inventory data but nothing else.

Flat packages...gotta love 'em...gotta hate 'em...

Don

--
https://donmontalvo.com

rockpapergoat
Contributor III

dudes… what?

pkgutil --expand <name of pkg> <name of output folder to create>

there's no need to install the thing to find out what's inside.

also, i'm guessing since most of these "quick add" pkgs just install the jamf binary, some launchd plists, and run a post flight using the jamf command, there's not much magic happening here.

i roll my own "quick add" pkgs with the luggage, and they work exactly the same way the ones exported via recon do.

external image link

donmontalvo
Esteemed Contributor III

@rockpapergoat Reading is easy with pkutil, Pacifist, etc. The problem we had on our end was needing to reengineer the hands-off QuickAdd using the latest Casper version. The "enroll" part kind'a put a kink in our plans...

--
https://donmontalvo.com