First time user...would like to deploy never-booted image

New Contributor II

As a first time user, I'm impressed with the array of knowledge here and hoping someone in here has tried this and been successful.

Is it possible deploy a never-booted image using Casper Imaging with an admin account added, SSH enabled for that account and a wireless profile? I've deployed a booted image with all of those items completed, but I'm a little new to scripting and wonder if someone has already done this, or if it's even possible.



Contributor II
Contributor II

For creating the base OS install there is a handy tool called AutoDMG
To create accounts for adding in to the image I use

As for enabling SSH, I just have this as a run after imaging script, although there are many (and better) ways to enable this. (replace casper with your admin account.)

/System/Library/CoreServices/RemoteManagement/ -configure -allowAccessFor -specifiedUsers
/System/Library/CoreServices/RemoteManagement/ -activate -configure -access -on -users "casper" -privs -all -restart -agent

The wireless profile I captured with Composer and added in to the image.

Picked up casper just a few months back and these tools have been helpful for me, but there are always other ways of doing it!

Valued Contributor

Enabling SSH could be done with AutoDMG, by creating a script and a launchagent then package them up and include it in your autodmg workflow, when the machine boots for the first time the launchagent runs the script which enables ard and then removes itself.

The wireless profile would done in a similar method, I'd create the profile using the Iphone configuration utility to generate a .mobileconfig file, then id use a script using the profiles command to install the profile. id then create a launchagent to run the script, package it up and dump it into autodmg workflow so that on first boot your machine will automatically configure itself

Contributor III

AutoDMG works well and does exactly what you want to do. I found this site helpful:

You can enable ssh with the following command:
launchctl load -w /System/Library/LaunchDaemons/ssh.plist

You can push out your wireless settings using a configuration profile.

New Contributor II

I created the script in TextWrangler and the format is not recognized by the JSS.

Contributor III

@pcamdm1 - make the script executable:

sh-3.2# chmod +x /

You can run it in terminal to test it. If ssh is already enabled, you will get something like this:

sh-3.2# /
bind(): Address already in use
com.openssh.sshd: Already loaded