Re: Login Script
From: Deji Akomolafe (noemail_at_akomolafe.dotcom)
Date: 12/19/04
- Next message: Herb Martin: "Re: Login Script"
- Previous message: scott: "Re: Login Script"
- In reply to: scott: "Re: Login Script"
- Next in thread: Herb Martin: "Re: Login Script"
- Reply: Herb Martin: "Re: Login Script"
- Messages sorted by: [ date ] [ thread ]
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. > >> > >> > > > > > >
- Next message: Herb Martin: "Re: Login Script"
- Previous message: scott: "Re: Login Script"
- In reply to: scott: "Re: Login Script"
- Next in thread: Herb Martin: "Re: Login Script"
- Reply: Herb Martin: "Re: Login Script"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|