Re: "Log on as a service" policy

From: Torgeir Bakken (MVP) (Torgeir.Bakken-spam_at_hydro.com)
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.

Hi

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
http://support.microsoft.com/?kbid=279664

How to: Determine NTRIGHTS Names and Meanings
http://support.microsoft.com/?kbid=245207

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

Windows Server 2003 Resource Kit Tools
http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en

(The kit will install on WinXP or later)

--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter


Relevant Pages

  • Re: How to script Group policy change
    ... Some of those settings you should be able to set with the Win2k ... resource kit tool ntrights.exe: ... Ntrights.exe is in the free Win2k3 resource kit (it very well might work ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.vbscript)
  • Re: Local Security Settings
    ... You can do a call-out to the Win2k resource kit tool ntrights.exe for this I ... ntrights.exe -r SeInteractiveLogonRight -u groupname ... Microsoft MVP Scripting and WMI, ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Autoexec.nt error in XP
    ... > In the command prompt, type in the following two commands exactly as ... > cd /d %windir% ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.windowsupdate)
  • Re: Autoexec.nt error in XP
    ... > In the command prompt, type in the following two commands exactly as ... > cd /d %windir% ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.windowsupdate)
  • Re: script to stop a process
    ... > command line task kill utilities can. ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ...
    (microsoft.public.scripting.vbscript)