开发者

Running new process with other user privileges from java application

开发者 https://www.devze.com 2023-03-09 17:58 出处:网络
i need to create new process with my application, with specific user permissions & privileges (not the user running my application).

i need to create new process with my application, with specific user permissions & privileges (not the user running my application). my application is installed on unix, linux, windows (xp, vista, 7, 2000+ server).

i am starting with windows. Runtime.exec() with "runas" command will not work, because password is required, and there is no way to embed password in runas command (there is a VB script that doing that, but its not for win7, xp).

is there a way to do that? is there an open source that handle this issue for all Operating systems? can you give a piece of开发者_Python百科 code for example?

thanks...


I am not sure about Windows, but on modern Unixes the canonical way to run a command as another user is sudo.

0

精彩评论

暂无评论...
验证码 换一张
取 消