Self Service won't install in Imaging process

pdwyer
New Contributor

First time using Casper Imaging and ran into a few hiccups, but slowly working them out. Biggest issue now is Self Service will not install on the imaged machines. We are using target imaging, and it laying down El Capitian, and a few other packages. The other packages, and El Capitan install fine and work, but self service doesn't install. I have it checked to install automatically in JSS. Has anyone else seen this, and what might the solution be?

Thanks, Paul

3 REPLIES 3

rderewianko
Valued Contributor II

So, Self service installs after imaging. Upon first run / connection to the network.

What happens when you boot into the os (connected to the network) and run sudo jamf policy

pdwyer
New Contributor

I can run sudo jamf recon and also sudo jamf policy and it connects and runs data fine. I do get an error on a wireless script below for my macbook airs. Says "en1" isn't a wireless network. Other than that, can't see any errors and the "sudo jamf policy" will install the scripts and also self service will get installed after running this command.

Could the script below be the issue? Is there a way to force the command to be run?

!/bin/sh

SSID="EMPS"
PASSWORD="ElmwoodMurdockKnights"

/usr/sbin/networksetup -removeallpreferredwirelessnetworks en1 AirPort
/usr/sbin/networksetup -setairportpower en0 on
/usr/sbin/networksetup -setairportnetwork en0 "$SSID" "$PASSWORD"

Nix4Life
Valued Contributor

@pdwyer Not sure if this is a blanket script for all your macbooks, but you solved your own issue. on Macbook Airs, there is no en1, it's en0 as the second part of your script shows, so that is why you are getting the error. on Macbook Pros, en1 is the wireless port. perhaps you could build some logic into your script. below is a snippet of my firstboot, perhaps it could help(Note: sudo may or may not be needed,depending on your configuration)

# Enable/Disable Wifi Based on Model Type
MODEL=$(sysctl hw.model | cut -c11-20)
      if [ "$MODEL"  == "MacBookPro" ]; then
        networksetup -setairportpower en1  on;sleep 2;networksetup -setairportnetwork  en1 yournetwork
# Set so only admins can manage
        sudo /usr/libexec/airportd en1 prefs RequireAdminIBSS=YES
        sudo /usr/libexec/airportd en1 prefs RequireAdminNetworkChange=NO
        sudo /usr/libexec/airportd en1 prefs RequireAdminPowerToggle=Yes
          else
    if [ "$MODEL"  == "MacBookAir" ]; then
        networksetup -setairportpower en0  on;sleep 2;networksetup -setairportnetwork  en0  yournetwork
# Set so only admins can manage
        sudo /usr/libexec/airportd en0 prefs RequireAdminIBSS=YES
        sudo /usr/libexec/airportd en0 prefs RequireAdminNetworkChange=NO
        sudo /usr/libexec/airportd en0 prefs RequireAdminPowerToggle=Yes
# Turn Wireless off
               else
        sudo /usr/libexec/airportd en1 prefs RequireAdminIBSS=YES
        sudo /usr/libexec/airportd en1 prefs RequireAdminNetworkChange=NO
        sudo /usr/libexec/airportd en1 prefs RequireAdminPowerToggle=Yes
        networksetup -setairportpower en* off
    fi
fi

hth

Larry