Admin Rights

ViRo - Jul 29, 2009 at 02:59 AM
 ViRo - Jul 29, 2009 at 05:31 AM

How do I add a user to have administrative rights without being prompt for a password.
I want to apply it as a logon script, and this is want I have. It works, but prompts for the password

@echo off
runas /user:Domain\username "net localgroup administrator /add domain\%username%

If there is a way in vbs could you post the command lines, as I am not familiar with it.
Oh, I have also tried piping the password... sadly it didn't work...

2 responses

Blocked Profile
Jul 29, 2009 at 04:14 AM
Hye there,

all you will have to do:

You have to add the users DOMAIN account to the LOCAL Adminstrators group, on the local machine, using User Manager (or new localgroup from command line). Open the Administrators group and use the add button. In the drop down box make sure you are listing names from the domain, and just select the one you want.

Don't add them to the Administrator's group on the server - just makes them a local Administrator of the server machine (as opposed to the domain, and certainly not an Administrator of any machines in the domain).

That's all
I would like to give all the users administrative rights on there own machines, not on the server.
This command works

runas /user:domain\username "net localgroup administrator /add domain\%username%"

but I want it to be automated, without prompting for a password.
If you maybe now of some commands that I can use, either with vbs or bat files it would be great