rud3y
rud3y

Reputation: 2332

Batch Commands to edit registry entries for Local Security Policy/User Rights Assignment

Is there some batch command out there that will allow me to edit a server's Local Security Policy / User Rights Assignment ? Looking to add a user to 3 of the policies here: "Allow Log On Locally" , "Log On as a Batch Job" and "Log On as a Service" I prep servers for many companies preparing for the installation of my companies software. Many pieces of this software need user credentials for services and batch jobs.

I'm looking for some registry keys to edit so I can add them to my server prep script.

Any ideas?

Thanks in advance

Upvotes: 1

Views: 8443

Answers (2)

Bill_Stewart
Bill_Stewart

Reputation: 24525

I wrote an open-source tool for this:

https://github.com/Bill-Stewart/PrivMan

PrivMan is an open-source alternative to the ntrights utility found in the Windows Resource Kit. Some of the differences between PrivMan and ntrights are as follows:

  • PrivMan supports adding and removing multiple privileges/rights, whereas ntrights only supports one privilege/right at a time.

  • PrivMan can test whether an account has one or more privileges/rights, but ntrights cannot.

  • PrivMan can list accounts with a specified privilege/rights, but ntrights cannot.

  • PrivMan can report on all accounts and assigned privileges/rights, but ntrights cannot.

Upvotes: 0

PA.
PA.

Reputation: 29339

you can use the ntrights command from the resource kit, see more info here http://ss64.com/nt/ntrights.html and then try this

ntrights -u userName +r SeInteractiveLogonRight

Upvotes: 2

Related Questions