Пример #1
0
        public void GrantLogonAsService(WindowsUser windowsUser)
        {
            /*LsaManaged lsa = new LsaManaged();
             * lsa.AddPrivileges(windowsUser.Username, "SeServiceLogonRight");*/

            LsaUtility.SetRight(windowsUser.Username, "SeServiceLogonRight");
        }
Пример #2
0
 static void Main(string[] args)
 {
     foreach (string accountName in args)
     {
         LsaUtility.SetRight(accountName, "SeServiceLogonRight");
     }
 }