Re: "Log on as a service" policy

From: Torgeir Bakken (MVP) (
Date: 12/16/03

Date: Tue, 16 Dec 2003 15:48:51 +0100

TC wrote:

> How can I change the Policy "Log on as a service" without using the "Local Security Settings" snapin ?
> I need to change this policy as part of an installation where a new service user is added for running of a service. This user must then be added to the "Log on as a service" user list.
> Is there any way to do this with a command line tool ? I have tried to look at secedit.exe but due to lack of documentation from MS I couldn't figure out how to do this.


You can do a call-out to the resource kit tool ntrights.exe for this I
would think:

ntrights.exe +r SeInteractiveLogonRight -u <username/groupname>

How to Set Logon User Rights with the Ntrights.exe Utility

How to: Determine NTRIGHTS Names and Meanings

Ntrights.exe is in the free Win2k3 resource kit (it works on Win2k as

Windows Server 2003 Resource Kit Tools

(The kit will install on WinXP or later)

Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: