/build/static/layout/Breadcrumb_cap_w.png

Embed KBOX Hostname in Mac Client Install

Is is possible to embed the KBOX hostname in the Macintosh 5.3 agent install package? I use this feature now on our 5.3.x release Windows installs by appending the KBOX name to the end of the .MSI file name.

1 Comment   [ + ] Show comment
  • I was directed to this thread by the *brilliant* Dell Enterprise KACE Support because we have been trying to inject our kace1000 address to the 5.5.904xxx client for Mac and after install do a runkbot 2 0 to check the mac into Kace, and we have had no straight answer from them, except this post. - gpalau 9 years ago
    • I tried the solution presented of pushing the amp.conf with Packages into the pkg file, but I dont understand how to run the postinstall script since that is apple script. when I run it I get an error:

      Untitled 5.sh: line 1: tell: command not found
      Untitled 5.sh: line 2: activate: command not found
      Untitled 5.sh: line 3: delay: command not found
      Untitled 5.sh: line 4: syntax error near unexpected token `do'
      Untitled 5.sh: line 4: `do shell script "sudo /Library/Application\ Support/Dell/KACE/bin/runkbot 1 0"' - gpalau 9 years ago

Answers (7)

Posted by: steelc 12 years ago
Senior Yellow Belt
0
The last time I asked support about this the answer I received was no, but I would love it if that has changed. Right now in order to deploy the agent through Apple Remote Desktop you have to push the install and then run a shell command to set the KBox hostname.
Posted by: joncutler 12 years ago
Blue Belt
0
Is that shell command provided by KACE or developed internally? Would you be willing to share?

Thanks,
Posted by: steelc 12 years ago
Senior Yellow Belt
0
Yes, I got this from Kace support, although I was incorrect with my first post. You need to first copy the installer pkg to the machine and then use a shell script to install it:

sh -c 'KACE_SERVER=kace.dickinson.edu installer -pkg /tmp/AMPAgent.pkg -target /'

So I first send the package to /tmp/AMPAgent.pkg using the copy files command, and then run the shell script as root to actually perform the installation.
Posted by: fletchlives 12 years ago
Yellow Belt
0
this command ran successfully however it did not embed my k1000 address into the AMPAgent.pkg. this would be helpful to have working though. Has anyone else got this working?


This might be helpful to you:
Using Packagemaker.app, I was able to get the k1000 address to register on the clients by re-bundling the AMPAgent.pkg with the amp.conf file. The amp.conf file is located in /Library/Application Support/Dell/KACE/data. This file stores the kace server address and company name. Tell packagemaker to place this file in the same directory after the ampagent installs.

I also added a post-install script to force an initial check-in by using the following applescript:

tell application "Terminal"
activate
delay 0.5
do shell script "sudo /Library/Application\ Support/Dell/KACE/bin/runkbot 1 0"
end tell
Posted by: steelc 12 years ago
Senior Yellow Belt
0
Sorry I wasn't clear on my post. I didn't mean to say that it would embed the hostname in the ampagent.pkg, but that this was one way to install the package via Apple Remote Desktop.
Posted by: gpalau 9 years ago
Senior Yellow Belt
0

I was directed to this thread by the *brilliant* Dell Enterprise KACE Support because we have been trying to inject our kace1000 address to the 5.5.904xxx client for Mac and after install do a runkbot 2 0 to check the mac into Kace, and we have had no straight answer from them, except this post.

I tried the solution presented of pushing the amp.conf with Packages into the pkg file, but I dont understand how to run the postinstall script since that is apple script.  when I run it I get an error:

Untitled 5.sh: line 1: tell: command not found
Untitled 5.sh: line 2: activate: command not found
Untitled 5.sh: line 3: delay: command not found
Untitled 5.sh: line 4: syntax error near unexpected token `do'
Untitled 5.sh: line 4: `do shell script "sudo /Library/Application\ Support/Dell/KACE/bin/runkbot 1 0"'


Can someone please advice on this?

As a side note, I don't know why dell doesnt provide a service where we can go to a webpage and enter our kace1000 address and let them deliver us a kace client with this info embedded.

I tried the solution presented of pushing the amp.conf with Packages into the pkg file, but I dont understand how to run the postinstall script since that is apple script.  when I run it I get an error:

Untitled 5.sh: line 1: tell: command not found
Untitled 5.sh: line 2: activate: command not found
Untitled 5.sh: line 3: delay: command not found
Untitled 5.sh: line 4: syntax error near unexpected token `do'
Untitled 5.sh: line 4: `do shell script "sudo /Library/Application\ Support/Dell/KACE/bin/runkbot 1 0"' - See more at: http://www.itninja.com/question/embed-kbox-hostname-in-mac-client-install#sthash.rxggTtyW.dpuf
I was directed to this thread by the *brilliant* Dell Enterprise KACE Support because we have been trying to inject our kace1000 address to the 5.5.904xxx client for Mac and after install do a runkbot 2 0 to check the mac into Kace, and we have had no straight answer from them, except this post. - See more at: http://www.itninja.com/question/embed-kbox-hostname-in-mac-client-install#sthash.rxggTtyW.dpuf

Comments:
  • Sorry I had to remove my previous post because it is probably best to use dmg for this.
    Put the AMPAgent.pkg on a dmg and package it up using packagemaker; put the dmg in /tmp

    as a post install script add the following;
    ____
    #!/bin/bash

    # Mount DMG
    hdiutil attach /tmp/AMPAgent.dmg

    # Install Kace Agent
    sudo sh -c 'KACE_SERVER=k1000.yourdomain.com installer -pkg /Volumes/AMPAgent.pkg -target /'

    # Unmount DMG
    hdiutil detach /Volumes/AMPAgent

    # Delete AMPAgent.dmg
    sudo rm -f /tmp/AMPAgent.dmg

    # Run Checkin
    /Library/Application\ Support/Dell/KACE/bin/runkbot 1 0

    exit 0
    ___

    Essentially this will install the agent with your k1000 server address and do an inventory checkin.
    Make sure your post install script is executable or it wont work. (chmod +x /path/to/yourscript.sh - rickreilly 9 years ago
    • what is the difference between runkbot 1 0 and runkbot 2 0 ? - gpalau 9 years ago
      • 1 does bootstrap
        2 runs client and checks for agent updates
        3 scripts
        4 inventory
        5 install agent updates only
        6 runs managed installs - rickreilly 9 years ago
  • Vote this up, so maybe they will add some support for to pre-configure the agent installer:
    https://kace.uservoice.com/forums/82699-k1000/suggestions/4035615-allow-mac-agent-installer-to-have-preconfigured-se - erush 9 years ago
Posted by: gpalau 9 years ago
Senior Yellow Belt
0

I made an article on my blog based on the script needed to run this after I finally figured out how to do it: http://www.enterpriseosx.com/kace-1000-agent-mac-silent-installer/

edit: tried to paste my code here but its too long, so use this pastebin link: http://pastebin.com/MTBycuhP or check the article above.

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ