3

I'm writing OS X application and I want to check if current user have empty password. I tried to use Authorization Services for it

var env = new AuthorizationEnvironment();
env.Password = "";
env.Username = <MyUserName>;

using (var auth = Authorization.Create(
    null,
    env,
    AuthorizationFlags.Defaults))
{
    Console.WriteLine("Auth obtained: " + (auth != null));
}

but it always printing "Auth obtained: True".

I tried to pass AuthorizationParameters but I can't find what PathToSystemPrivilegeTool I should use since then its printing "Auth obtained: False" with any value.

Could, please, someone point me a direction which I should look for?

Maxim Kosov
  • 1,930
  • 10
  • 19

0 Answers0