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
Avatarcraig asked 4 months 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
AvatarJyoti answered 4 months ago
Your Answer

17 + 20 =

Popular Tags

WP Facebook Auto Publish Powered By :