Try to search your question here, if you can't find : Ask Any Question Now ?

How to run NSTask as a different user

HomeCategory: stackoverflowHow to run NSTask as a different user
craig asked 1 week ago

I have a program that runs as the root user (getuid() returns 0).

I need to execute a command line tool as the user that’s currently logged in (which I can determine by getting the HOME env var, it seems).

How do I do that, ideally by using NSTask?

I know how to execute the tool using NSTask as the current (root) user, so all I need is to know what I need to change about that.

1 Answers
Best Answer
Jyoti answered 1 week ago
Your Answer

3 + 8 =

Popular Tags

WP Facebook Auto Publish Powered By :