We have three KACE appliances here, for development, testing and production. On the Windows side, we have a KACE script that can remotely re-point a client with the AMPTools host=[server] command. I've been trying to create a similar script that works for the Mac OS. I've tried just about every approach I can think of from launching sudo from /usr/bin to putting the entire sequence in a shell script and launching that:

cd /Library/Application\ Support/Dell/KACE/bin
sudo ./AMPTools host=[our-dev-server]
The Run Now log shows a successful completion and the script runs just fine from the Terminal, but the target server on the client doesn't change. Any ideas what I'm doing wrong?


4 Comments   [ + ] Show Comments


  • I just learned that our KACE appliance is having some issues that may be at the root of this (and the dents my head has been making in the wall). I did try it with and without the sudo and had the same results.
    • Are you having issues with Online Shell Scripts? We found yesterday that they list as running on the Run Now Status page but never actually run.
  • One more thing...
    I just noted that the amp.conf file reverts back to the original appliance after a while. It's like the KBOX is protecting itself from a change to the amp.conf file.
  • I tried making this an offline script and used the sleep command.

    Do you have any hints on what the at command syntax would look like. I've been testing it interactively and keep getting a "garbled time" error. I've been trying things like:

    at -f 'myscript.sh' now + 1 min
    echo [path/to/myscript.sh] | at now + 1 min

    (these are some ideas I found on various Linux forums)

    Thanks Chuck
  • Chuck (or anyone) - I'm having some trouble getting the at command to work (the time string always comes back "garbled" when I test it interactively). Any hints on the syntax for this?

Please log in to comment


The KACE client runs with root privileges so you don't need to use sudo. I haven't done this with KACE but I have used Apple Remote Desktop and just send this command:
/Library/Application\ Support/Dell/KACE/bin/AMPTools set host=newhost
Answered 06/16/2015 by: chucksteel
Red Belt

  • Chuck, I did try this with the sudo removed and that didn't help. I also noticed that running the script also stops the AMPAgent service. Unfortunately we only have ARD running in a couple of isolated labs so that tool isn't available to me.

    I noted that your command included "set" host=... and I tried that, as well, without success.

    For the record, running the KACE Agent 6.3.314 on Mac OS 10.10.3
    • I wonder if a better approach would be to upload a amp.conf file with the new host line set as you wish and then have the script replace the file using a file copy. You would then need to restart the AMPTools service also, or just wait for the machine to restart.
      • Chuck,
        I gave that a try, using both an AMPTools restart and a an AMPTools stop followed by a start in the script and that left the system in a state where it wasn't connected to either system. My "get" looks like this:

        KACE Agent version 6.3.314 Apr 13 2015
        Config: debug: false
        Config: config: amp.conf
        Config: host: pcckboxdev.pcc.edu
        Config: lasthost: pcckbox.pcc.edu
        Config: serverversion: 6.3.113399
        Config: appliance: k1000
        Config: ampport: 52230
        Config: ampurl: https://pcckbox.pcc.edu:52230
        Config: webport: 443
        Config: weburl: https://pcckbox.pcc.edu
        Config: hideapps:
        Config: rto: 20
        Config: wto: 20
        Config: cto: 10
        Config: crto: 30
        Config: max download speed: unlimited
        Config: KSWMeterSvc max db rows: 5000
        Config: krash: false
        Config: pl: pluginDesktopAlerts,pluginPatchin... (etc)

        I have the amp.conf file attached as a dependency and my script looks like this:

        # redirects a KACE client to pcckboxdev - rgetter 070215
        cd ${0%/*}
        mv -f amp.conf /Library/Application\ Support/Dell/KACE/data
        # restart the AMPAgent
        /Library/Application\ Support/Dell/KACE/bin/AMPTools stop
        /Library/Application\ Support/Dell/KACE/bin/AMPTools start

        This is really strange. It was so easy to do this on Windows.

        (And thanks for your help on this)
      • I'm guessing that things get wonky when the script loses connection during the change. Perhaps it would be better to have your script schedule the AMPTools command to run a few minutes into the future using the at command.
Please log in to comment
Answer this question or Comment on this question for clarity