logon Script rights

G

Grant

I created a batch file that adds users to the local machines administrators
group account at logon if theyre not already there.

net localgroup administrators "domain_name\user1" /add
net localgroup administrators "domain_name\user2" /add

Wierd thing is that only when user1 is part of the admin group will the
script add user2. If user1 is not already part of the localAdmin group then
user2 (or user1) does not get added.
So the script looks like it uses the credentials of whoever is logging in at
the time. How would get this to run under a different account name?

Thanks.Grant
 
P

Philip Nunn

put the script in the GPO as a Computer Startup script, under "Computer
Config>window settings>scripts"

Philip Nunn
 
G

Gary Mudgett [MSFT]

If you want the same users to be local Administrators on several machines
you might consider creating a GPO and using the Restricted Groups to create
the membership that you want.

Computer Configuration\Windows settings\Security Settings\Restricted Groups

--
Gary Mudgett, MCSE, MCSA
Windows 2000/2003 Directory Services

=====================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top