Running new process with other user privileges from java 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
.
精彩评论