Re: Login Script

From: Deji Akomolafe (noemail_at_akomolafe.dotcom)
Date: 12/19/04


Date: Sun, 19 Dec 2004 15:47:43 -0800

the variable is %username%. So your syntax would be:

net localgroup administrators yourdomainname\%username% /ADD

That would add ANY user that logs into the computer into the administrators'
group IF you are using Machine Startup Script through a GPO as suggested by
Oli. This may be something you want to do in a controlled fashion.

You can set a day when you will tell your users "if you want to get admin
rights on your computer, please reboot your computer at 10 am tomorrow and
log back in, etc, etc". Then you will enable this policy at, say, 9am on
that date and take it off at 11am.

-- 
Sincerely,
Dèjì Akómöláfé, MCSE+M MCSA+M MCP+I
Microsoft MVP - Directory Services
www.readymaids.com - we know IT
www.akomolafe.com
Do you now realize that Today is the Tomorrow you were worried about
Yesterday?  -anon
"scott" <sbailey@mileslumber.com> wrote in message
news:#ZyWrVg5EHA.4008@TK2MSFTNGP15.phx.gbl...
> Can you write the "net" syntax and where to put the parameter? I'm
confused.
>
>
> "Oli Restorick [MVP]" <oli@mvps.org> wrote in message
> news:%23%23z%23$2f5EHA.2012@TK2MSFTNGP15.phx.gbl...
> > You're very close.  If you do this from a user login script, the user is
> > not likely to have the required permissions to make the change.
> >
> > What you need to do is to use Group Policy to run this as a computer
> > startup script.  This runs in the context of the machine and it will
work
> > nicely. Use "net" as the command and the rest of the string as the
> > parameter.
> >
> > I would, however, recommend that you create a group (e.g. "Workstation
> > Admins") and make this a member of the local group and make the user a
> > member of the "workstation admins" group.
> >
> > Regards
> >
> > Oli
> >
> >
> >
> > "scott" <sbailey@mileslumber.com> wrote in message
> > news:ezBn3cf5EHA.2540@TK2MSFTNGP09.phx.gbl...
> >> I'm trying to add the current user (member of DOMAIN USER GROUP) to the
> >> LOCAL ADMINISTRATORS group with below code in FIGURE 1, but get error
in
> >> FIGURE 2.
> >>
> >> Do I need to add any extra credentials?
> >>
> >>
> >> FIGURE 1
> >>
> >> Net Localgroup Administrators "mydomain\myUser" /Add
> >>
> >>
> >> FIGURE 2
> >>
> >> System error 5 has occurred.
> >> Access is denied.
> >>
> >>
> >
> >
>
>


Relevant Pages

  • User access rights problem
    ... In Users and Groups I have a user that is a member of the administrators ... However when he logs on to a a terminal server session and attempts ...
    (microsoft.public.win2000.security)
  • Re: Administrator cant change security
    ... administrators group on the domain member can configure permissions on any ... computers can not reliably contact a domain controller. ... I'm signing on as Administrator on a second Windows 2003 server that is ...
    (microsoft.public.windows.server.security)
  • Re: Security groups being removed
    ... be the expected behavior because of the AdminSDHolder thread on the DC ... This object is used to control the permissions of user accounts that are ... members of the built-in Administrators or Domain Administrators groups. ... a user account is a member of one of these administrative groups because ...
    (microsoft.public.windows.server.sbs)
  • RE: Permissions
    ... administrative permissions in each domain (Domainb.local ... Create a local group on the member server in the ... >Symptom 1 often occurs when the domain administrators ...
    (microsoft.public.win2000.security)
  • Re: True difference between Domain Admin grp and Administrators Group
    ... is a member of the domain "administrator" group by default. ... The domain admin group not only has local administrator ... group is automatically added to the local "administrators" group. ... Members of this group have full control of the domain. ...
    (microsoft.public.windows.server.general)