Skip to main content
Solved

"Could not find domain for" error message when loading plist using launchctl


Forum|alt.badge.img+2

Hi,

I am trying to deploy .pkg thru jss. My deployment works fine in Yosemite. I have the issues in installing in EL captain.

My pkg has a post installation .sh, which in turn lunch a helper exe tool. I am launching my agent plist from the helper tool using system("launchctl load /Library/LaunchAgents/com.myplist.plist") api. This gives me error "Could not find domain for" . Before the above line of code I am calling setuid() api too with current logged in users UID.

This might be a issue because of EL captains enhanced security feature as jamf runs the .pkg with root user. Is there a way to run the .pkg with non root context with Authorization?

Thanks,
Birajendu

Best answer by thoule

Sooo soo many conversions about running a tool as another user.

I suggest you go through them and see if anything works. There's also a few feature requests to allow a script to run as a user.

For myself, I just tell the user to restart after installing...

View original
Did this topic help you find an answer to your question?

3 replies

Forum|alt.badge.img+15
  • Contributor
  • 589 replies
  • Answer
  • April 27, 2016

Sooo soo many conversions about running a tool as another user.

I suggest you go through them and see if anything works. There's also a few feature requests to allow a script to run as a user.

For myself, I just tell the user to restart after installing...


mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • 7881 replies
  • April 27, 2016

Agreed. The topic of "how do I run X as the user, not as root" has to be the most common topic on these forums. I believe it was suggested to JAMF, maybe even in a Feature Request, that they allow for some topics or threads to be "sticky", and/or something that shows under a common questions/FAQ section here. It would be very beneficial if they did that, since it would prevent so many new posts on stuff that's been rehashed like a thousand times already.

Just to be clear, I am not blaming @birajendu. The search here on JN leaves a bit to be desired and, again, there's no FAQ or common questions section for people to see when they arrive, so its not really new user's fault. They are just looking for an answer and its not always easy to know what to type in for a search to pull up a relevant answer unless you frequent these boards and know the keywords.


Forum|alt.badge.img+2
  • Author
  • New Contributor
  • 1 reply
  • April 28, 2016

Thank you for the suggestion, I have found solution for my scenario in the link you have pointed.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings