Answer the question
In order to leave comments, you need to log in
How to execute code as another user for Linux?
There is an example of such libraries https://github.com/mwijnands/Impersonator , but they only work under Windows.
using (new Impersonator(@"domainname\username", "password"))
{
// this code is executed as the user with supplied credentials.
var files = Directory.GetFiles(@"\\server\share\folder");
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question