I have been trying to build an automated package of the Kbox Agent for Mac that injects our K1000 host name on the client and have used a script I found on this article: http://www.kace.com/support/resources/kb/article/K1000-5-3-Mac-OS-agent-as-a-Post-Installation as a stepping stone, but I have not been able to install the client with this.  It used to work great on the 5.4 client but it doesnt work with 5.5.3.0275.

Basically I create a new project in Iceberg (I have done it on Packages and Packagemaker with the same results).  I select the AMPAgent.pkg and drag it into the additional resources section of the project then I attach my postflight script:

#!/bin/sh
mkdir -p "/Library/Application Support/Dell/KACE/data"
Printf "host=myKace1000.meh.boo" >> "/Library/Application Support/Dell/KACE/data/amp.conf"
sleep 15
/usr/sbin/installer -pkg "$1/Contents/Resources/AMPAgent.pkg" -target /

Then I save the script and I run the command sudo chmod a+x /path/to/postflight to make the script executable.  

When I run the package, it appears to be installing and near the end of the execution it breaks the install and I get an error:

The installation failed.

The installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.

Of course calling KACE about it is pretty useless as they dont have knowledgebase with this kind of information for Mac.

Please advice

Answer Summary:
Cancel
1 Comment   [ + ] Show Comment

Comments

  • Jb32 wrote: "Our MACs are also on different subnets, so often we will have to use ARD's ability to scan a network to find our lost MACs. Is that an option for you?"

    Would that be doing a bonjour search or a network range search. I've tried searching for them, but a lot of them don't show up, mostly because we can't reach them. ARD got recently implemented so there are some gaps.

    We also tried using the built in KACE client deployed but it was a hit and miss and it really didn't work.
  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
Please log in to comment

Answers

1

Thanks to CBLAKE for pointing it out...

I found the solution in http://www.enterpriseosx.com/kace-1000-agent-mac-silent-installer/

I tried to post the script here but it didnt translate well.  So if you go to the link above they have step by step instructions how to get it working and you can download a guide how to do it as well.  Pretty nifty.
Answered 06/24/2014 by: gpalau
Senior Yellow Belt

Please log in to comment
1
Updated for 6.2: http://www.enterpriseosx.com/kace-1000-agent-6-2-1025-silent-installer-for-mac/
Answered 01/20/2015 by: cblake
Red Belt

  • Thanks, I found this a couple of days ago, so far is working great...
Please log in to comment
0

If you're still having this problem, and you haven't tried the -allowUntrusted flag yet, I'd give it a shot. I've seen the command line version of installer throw that generic "encountered an error" message for expired certs, which is a problem that existed in the first release of the 5.5.30275 agent. 

/usr/sbin/installer -allowUntrusted -pkg "$1/Contents/Resources/AMPAgent.pkg" -target / 
Answered 05/02/2014 by: Machead
White Belt

Please log in to comment
0

Sometimes we update our MAC agents via Apple Remote Desktop using the following unix.  Perhaps it will help you:

sudo /Library/Application\ Support/Dell/KACE/bin/AMPTools stop

rm -rf /Library/Application\ Support/Dell/*

hdiutil attach /tmp/ampagent-5.5.30275.osx.all.dmg

sudo sh -c 'KACE_SERVER=kboxDNSorIP installer -pkg /Volumes/Dell_KACE/AMPAgent.pkg -target /'

hdiutil detach '/Volumes/Dell_KACE'

/Library/Application\ Support/Dell/KACE/bin/AMPTools stop

/Library/Application\ Support/Dell/KACE/bin/AMPTools start

/Library/Application\ Support/Dell/KACE/bin/runkbot 2 0

 

 

 

Answered 04/17/2014 by: Jbr32
Tenth Degree Black Belt

  • If you are using the dmg file to deploy the agent rather than extracting the .pkg how are you running this script? where are you calling it from? I tried to add it as my postflight but it crashes the install as well.
    • We run this script via Apple Remote Desktop.
  • Also, how are you running runkbot 2 0 without a sudo commnad, it never runs for me...
    • The Apple Remote desktop account that runs the unix scripts is running at root, so that is probably why the sudo command is not necessary.
      • That is true, I figured by then this would be an ARD script. I need to figure out how to convert this script as a stand alone postflight or preflight script and make it part of the install process.
  • I tried your script verbatim as you have it in your post, as both a preflight and postflight and it didnt work. The only change I made was KACE_SERVER which I pointed it to mine. When I ran the installer it crashed again.
    • Here is another suggestion. Install the agent without specifying your server. As you may know, when you run the agent manually the default k1000 server name is kbox. Create an entry in /etc/hosts to point kbox to the IP address of your k1000.
      • The biggest problem we are having with ARD is that we have all our macs spread around different subnets, a lot of these machines have lost connection to the network, so we are approaching this in two ways: 1) by pushing the client via ARD to the macs we see and by physically / by site installing it. I wanted to streamline the install so it would be a quick and easy drop.
      • Our MACs are also on different subnets, so often we will have to use ARD's ability to scan a network to find our lost MACs. Is that an option for you?
  • Jbr32 wrote: "Our MACs are also on different subnets, so often we will have to use ARD's ability to scan a network to find our lost MACs. Is that an option for you?"

    Would that be doing a bonjour search or a network range search. I've tried searching for them, but a lot of them don't show up, mostly because we can't reach them. ARD got recently implemented so there are some gaps.

    We also tried using the built in KACE client deployed but it was a hit and miss and it really didn't work.

    This commenting system sucks.
    • Yes the commenting system could be improved.

      Within ARD we use the network range scanning tool. Seems to work for us. ARD is a great tool, only gets a minor point revision when a new version of OSx is released but overall works well.

      The Kace deployment for MACs will only work if you 1) know the L/P on the clients 2) have SSH enabled and 3) don't have any FW rules in place to block SMB connections.
Please log in to comment
0

I've had a few similar problems to overcome so let me share what's worked for me.

  • Enable ARD on all your systems by SSH'ing into them and running this command: sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users <admin-shortname> -privs -all -restart -agent
  • Create Scanners in ARD for each subnet so that you can check multiple times per day each subnet for systems that may be online. Add them when you see them.
  • Keep a copy of a working amp.conf from /Library/Application Support/Dell/KACE/data available on a thumb drive and in ARD as a file copy template
  • Use ARD to stop, start, and restart the AMPAgent - again with templates: /Library/Application Support/Dell/KACE/bin/AMPctl <start-stop-restart>
  • Use ARD to have a runkbot template as well
  • If you're building an installer, have it copy/insert that complete amp.conf, not just the server address
Answered 04/22/2014 by: SpacePC
White Belt

Please log in to comment
Answer this question or Comment on this question for clarity