Solved

Batch file

Posted on 2013-06-04
3
336 Views
Last Modified: 2013-06-05
i have this script: net localgroup Administrators "techlabtest\Finance" /Add
techlabtest is my domain
Finance is my security group
Inside Finance there are 3 domain user which do not have admin access.
I want to give them admin access at the same time.

Just for testing my script, When i run it manually on a user pc, i got access denied.

When i run it on an administrators account, it works well.

Please help me.

Thanks
0
Comment
Question by:techlabtest
3 Comments
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 39218693
The security model of Windows would be pretty weak if just about everybody could add a group to the local Administrators group of a server.
In other words: you have to be a local administrator to add other members to the local Administrators group. No way around it.
You can use a Restricted Groups GPO if you want to automate this.
Restricted Groups
http://technet.microsoft.com/en-us/library/cc785631(v=ws.10).aspx
0
 
LVL 7

Expert Comment

by:BT15
ID: 39219735
the above holds true if you are launching the script manually.

However, if you assign the script as a startup script in a GPO, then it will probably work the next time the machine reboots.

We do something similar here with VBS
0
 

Author Closing Comment

by:techlabtest
ID: 39221368
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question