A
Anon
Does anyone know how to add users to the log on locally list in User
Rights Management inside Local Security settings.
Thanks
Rights Management inside Local Security settings.
Thanks
Does anyone know how to add users to the log on locally list in User
Rights Management inside Local Security settings.
Thanks
Oh and I had test users in mind, so basically - "testuser1" for
example.
Thanks for the response Willy.
My initial plan was to add the user to a workgroup that was pre-
existing in the list, but then those workgroups might have privleges
which I would not want the users I create to have.
Well, actually there is nothing in the Framework that helps you with this.
So you will have to call into some WIn32 LSA API's using PInvoke.
Basically what you need to do is:
1. Get a LSA Policy handle for the target system, by calling LsaOpenPolicy.
2. Get the SID of the user account, by calling LsaLookupNames2
3. Add the "SeInteractiveLogonRight" for the account, by means of a call to
LsaAddAccountRights.
Note that LSA_UNICODE_STRING type as used in these API's is not a CLR
string, it's a structure you need to initialize correctly before you call
the API's, watch out!.
But again, before you can grant this privilege to an account, the account
MUST exist, why not simply create the account and make it a member of the
"users" group or a group which already has the "Allow Logon Locally"
privilege"?
Willy.
I did that and it says -- "specified privilege does not exist" for
"SeInteractiveLogonRight"
I did that and it says -- "specified privilege does not exist" for
"SeInteractiveLogonRight"- Hide quoted text -
- Show quoted text -
whoops pressed the wrong button. Sorry about that- Hide quoted text -
- Show quoted text -