Re: Setting Act As Part of Operating System - VBScript

From: Herb Martin (news_at_LearnQuick.com)
Date: 02/26/05


Date: Fri, 25 Feb 2005 20:36:00 -0600


"Roger Abell" <mvpNOSpam@asu.edu> wrote in message
news:O5ohh#5GFHA.2860@TK2MSFTNGP12.phx.gbl...
> I will also say that this sounds like a bad thing to do.
>
> That said, there is no direct way to grant user rights to accounts
> from script in Windows 2000 and later. You can however
> shell out to an execution of such as NTrights.exe from the
> resource kit. User Rights are policies, and there is no script
> interface for setting the values of policies.

I don't know about it being impossible but
even ignoring the security issue from a management
point of view it is better to do it another way
(and easier to program):

Build a GROUP for this purpose -- give it all
rights and privileges the "users" will need.

Then have the script put the user in that group.

(User will need to re-logon for it to take effect
but that is true for direct rights assingment anyway.)

-- 
Herb Martin
>
> -- 
> Roger Abell
> Microsoft MVP (Windows  Security)
> MCSE (W2k3,W2k,Nt4)  MCDBA
> "Jason" <Jason@discussions.microsoft.com> wrote in message
> news:ACF5AD77-66DA-4135-95A9-FA9B9ED759DB@microsoft.com...
> > I only want it for one user.  How do I do this in VBScript?  Once again
> I'm a
> > newbie to VBScripting.
> >
> > "Herb Martin" wrote:
> >
> > > "Jason" <Jason@discussions.microsoft.com> wrote in message
> > > news:8ACA55EB-0E77-4123-89E2-0C237A46D8E8@microsoft.com...
> > > > I would like to be able to set any given user that I just created to
> have
> > > the
> > > > right "Act as part of the operating system" using a VBSCript.  I'm a
> > > complete
> > > > newbie to VBScripting and I'm told this would be the only way to get
> this
> > > > functionality into my installshield.  Any suggestions?
> > >
> > > Sounds like a bad idea but you can give this right
> > > to a user or group (where you create the security
> > > principal.)
> > >
> > > A Group Policy can also do this.
> > >
> > > -- 
> > > Herb Martin
> > >
> > >
> > >
> > >
>
>


Relevant Pages

  • Re: Setting Act As Part of Operating System - VBScript
    ... > "Roger Abell" wrote: ... >> Beginning with W2k User Rights is a section in the ... >> local security policy, and in all GPOs. ... >> There is no API for setting any policy values from script. ...
    (microsoft.public.win2000.security)
  • Re: Setting Act As Part of Operating System - VBScript
    ... "Herb Martin" wrote in message ... >> for setting the value of a policy, including User Rights. ... There is no API for setting any policy values from script. ...
    (microsoft.public.win2000.security)
  • Re: basic map drive scripts
    ... Group Policy is about user rights and settings - it has no effect ... whatsoever on the mechanism that controls the mapping of a ... drive on top of an existing mapping. ... then run your VB Script. ...
    (microsoft.public.windows.server.scripting)
  • Creating Driectories without inheritable permissions from Parent Problem.. Help!!!
    ... I'm running a little DOS batch script in a windows2000 environment to create ... Line2: Edit permission .. ... adding a domain user rights. ... which Allows inheritable permissions from Parent to propagate to this object ...
    (comp.os.ms-windows.nt.admin.security)
  • Creating Driectories without inheritable permissions from Parent Problem.. Help!!!
    ... I'm running a little DOS batch script in a windows2000 environment to create ... Line2: Edit permission .. ... adding a domain user rights. ... which Allows inheritable permissions from Parent to propagate to this object ...
    (comp.os.ms-windows.nt.admin.security)