-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.0.2 Dockutil hangs when run as sudo #126
Comments
I have the same problem:
It just stalls on my MBP M1 on the comparing step. Alså if |
That happens to me too when I manually run it with ‘sudo’ in Terminal. But running it outside of the user context as root via script (i.e. Jamf policy) works fine for my environment when I tested it last week.
David H. Ng
Desktop Engineer | UCSF Information Technology
Mission Center Building, Room MCB-316
San Francisco, CA 94143
Direct Phone: (415) 502-2382
Direct Email: ***@***.***
https://www.ucsf.edu
From: Søren Theilgaard ***@***.***>
Sent: Monday, April 11, 2022 7:32 AM
To: kcrawford/dockutil ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [kcrawford/dockutil] 3.0.2 Dockutil hangs when run as sudo (Issue #126)
I have the same problem: # /usr/local/bin/dockutil --add "/Applications/Microsoft Word.app" --after 'Microsoft Edge' -v verbose mode 1 Plist paths: ["/Users/st/Library/Preferences/com.apple.dock.plist"] processing /Users/st/Library/Preferences/com.apple.dock.plist
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
I have the same problem:
# /usr/local/bin/dockutil --add "/Applications/Microsoft Word.app" --after 'Microsoft Edge' -v
verbose mode 1
Plist paths: ["/Users/st/Library/Preferences/com.apple.dock.plist"]
processing /Users/st/Library/Preferences/com.apple.dock.plist
/Users/st/Library/Preferences/com.apple.dock.plist
Comparing /Users/st/Library/Preferences/com.apple.dock.plist to /Users/st/Library/Preferences/com.apple.dock.plist
^C
It just stalls on my MBP M1 on the comparing step. Alså if --allhomes is used.
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/kcrawford/dockutil/issues/126*issuecomment-1095128126__;Iw!!LQC6Cpwp!vRXP6uNxF2LgDkUnJYnYlR1jMR5U26Z_RD1EOif7kgAxd-6GzC_1DFXx-Bpa1JEyLtFtV50V4cMUrnMrYxcozg$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ANKPKG2GWXQZZHXC6MAPOPLVEQZXNANCNFSM5QJI4P7A__;!!LQC6Cpwp!vRXP6uNxF2LgDkUnJYnYlR1jMR5U26Z_RD1EOif7kgAxd-6GzC_1DFXx-Bpa1JEyLtFtV50V4cMUrnOEqemdXw$>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.******@***.***>>
|
Thank you @dng2000, I will try again. I'm using Addigy, Mosyle and other MDMs (also Jamf), so I will verify if the others works the same way. |
I had to specify the plist file directly for it to work. dockutil did finish, but without the direct link to the plist-file on the correct user, it would only find the root user, when using Addigy. |
I have the same problem.
|
it looks like the defaults call on line 64 of Dock.swift is hanging without exit causing the whole thing to hang on the waitUntilExit() call. I'm not sure why defaults is hanging but that seems to be the holdup. |
I think there is/was an Apple bug with defaults/cfpreferences that would cause it to hang. Has anyone reproduced this on Sonoma 14.2.1 or newer? |
I have duplicated this using v3.0.2 on macOS 14.2.1, running as root. Using It does not seem 100% consistent. In roughly 50 systems, I am seeing this on ~3. Two things I should probably check when I have a free moment:
|
Just double-checked that it does not affect all users on the affected systems, just specific users. I don't see anything out of the ordinary in the plist, but I haven't done a careful inspection yet. |
sudo /usr/local/bin/dockutil --add "/Applications/Microsoft Outlook.app" --allhomes --no-restart -v
verbose mode 1
[file:///Users/Deleted%20Users/, file:///Users/_mbsetupuser/, file:///Users/.localized, file:///Users/Shared/, file:///Users/root/, file:///Users/anuser/, file:///Users/anuser2/]
/Users/Deleted Users/Library/Preferences
/Users/_mbsetupuser/Library/Preferences
/Users/.localized/Library/Preferences
/Users/Shared/Library/Preferences
/Users/root/Library/Preferences
/Users/anuser/Library/Preferences
/Users/anuser2/Library/Preferences
Plist paths: ["/Users/_mbsetupuser/Library/Preferences/com.apple.dock.plist", "/Users/root/Library/Preferences/com.apple.dock.plist", "/Users/anuser/Library/Preferences/com.apple.dock.plist", "/Users/anuser2/Library/Preferences/com.apple.dock.plist"]
processing /Users/_mbsetupuser/Library/Preferences/com.apple.dock.plist
Skipping: /Users/_mbsetupuser/Library/Preferences/com.apple.dock.plist does not seem to be a home directory or a dock plist
processing /Users/root/Library/Preferences/com.apple.dock.plist
Skipping: /Users/root/Library/Preferences/com.apple.dock.plist does not seem to be a home directory or a dock plist
processing /Users/anuser/Library/Preferences/com.apple.dock.plist
Skipping: /Users/anuser/Library/Preferences/com.apple.dock.plist does not seem to be a home directory or a dock plist
processing /Users/anuser2/Library/Preferences/com.apple.dock.plist
/Users/anuser2/Library/Preferences/com.apple.dock.plist
Comparing /Users/anuser2/Library/Preferences/com.apple.dock.plist to /Users/anuser2/Library/Preferences/com.apple.dock.plist
^C - Hangs here
Running in user context or sudo -u $username works without issue.
The text was updated successfully, but these errors were encountered: