Re: Re: LsaAddAccountRights

From: Jerold Schulman (Jerry_at_jsiinc.com)
Date: 03/09/05


Date: Wed, 09 Mar 2005 07:16:27 -0500


Do you know how to enumerate a users rights in a script?

On Tue, 08 Mar 2005 15:26:30 +0100, "Torgeir Bakken \(MVP\)" <Torgeir.Bakken-spam@hydro.com> wrote:

>Morten wrote:
>
>> Does anyone know if it's possible to create a user using vb script
>> and then add/remove privileges using LSA calls? I'm trying to
>> create local users and modifying their privileges.
>Hi
>
>For the LSA part:
>
>As far as I know, you must either use the resource kit tool
>ntrights.exe from your VBScript for this, or you will need to create
>your own compiled exe file that use the Local Security Authority
>(LSA) API's for this.
>
>
>To create a separate exe file that uses the LSA API's , here is a
>starting point:
>
>132958 How to Manage User Privileges Programmatically in Windows NT
>http://support.microsoft.com/default.aspx?scid=kb;EN-US;132958
>
>
>With the command line tool ntrights.exe:
>
>ntrights.exe +r SeServiceLogonRight -u SomeUserorGroupNameHere
>
>Use parameter "-m \\<some computer>" for remote operation.
>
>Ntrights.exe in the free Win2k3 resource kit works
>on Win2k and WinXP 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, but you can copy Ntrights.exe
>to a Win2k computer)
>
>Note: My experience is that NTRights.exe supports many more rights
>than the ones listed in the help output of NTRights.exe...

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com



Relevant Pages