Skip to main content
Solved

Error with dockutil

  • Oct 26, 2026 3:08 PM UTC
  • 2 replies
  • 77 views

Forum|alt.badge.img+8

I’ve got a simple solution with dockutil.

  1. Package installs automatically after enrollment or recurring check-in
    Installs Password Manager.app in /Applications and to files in /usr/local/bin
     
  2. Script for dockutil runs after the installation.
dockutil --add "/Applications/Password Manager.app"
  1. All gets installed but the application is not put in the Dock. The details says:

    Script exit code: 64

    Script result: Error: /var/root/Library/Preferences/com.apple.dock.plist does not seem to be a home directory or a dock plist
    Usage: dockutil [<options>] [<plist-location-specifications> ...] See 'dockutil --help' for more information.
     

Does anyone know what’s wrong? The Mac I’m tesing on runs macOS 27.0.1 and our version of Jamf Pro Cloud is 11.33.1.

Best answer by jonros

Hello, Your script is running as root, so dockutil is targeting the wrong 

Ok. Do you got any tip on how to fix it? Like all other scripts we run it’s deployed and triggered from Jamf som I don’t understand why it should be different this time.

View original

2 replies

Forum|alt.badge.img+8
  • Author
  • Valued Contributor
  • Answer
  • Oct 27, 2026 7:17 AM UTC

Hello, Your script is running as root, so dockutil is targeting the wrong 

Ok. Do you got any tip on how to fix it? Like all other scripts we run it’s deployed and triggered from Jamf som I don’t understand why it should be different this time.


Forum|alt.badge.img+8
  • Author
  • Valued Contributor
  • Oct 27, 2026 8:03 AM UTC

Solved it. Thanks for the input though.

#!/bin/bash

APP="/Applications/Password Manager.app"
DOCKUTIL="/usr/local/bin/dockutil"

USER_NAME=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && !/loginwindow/ {print $3}')
USER_ID=$(id -u "$USER_NAME")

launchctl asuser "$USER_ID" sudo -u "$USER_NAME" "$DOCKUTIL" --add "$APP" --position end