K1000 5.5.3.0275 automated Mac OS Agent
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
Answers (5)
Comments:
-
Thanks, I found this a couple of days ago, so far is working great... - gpalau 9 years ago
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 /
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
Comments:
-
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. - gpalau 10 years ago
-
We run this script via Apple Remote Desktop. - Jbr32 10 years ago
-
Also, how are you running runkbot 2 0 without a sudo commnad, it never runs for me... - gpalau 10 years ago
-
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. - Jbr32 10 years ago
-
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. - gpalau 10 years ago
-
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. - gpalau 10 years ago
-
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. - Jbr32 10 years ago
-
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. - gpalau 10 years ago
-
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 10 years ago
-
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. - gpalau 10 years ago-
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. - Jbr32 10 years ago
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
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. - gpalau 10 years ago