Discussion Locked

admin account on multiple systems

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am trying to add a local admin account to 300 systems across the network. And remove one as well. I know how to add or delete the user with the net use command but am unable to set the access permissions for this. Does anyone out there know of a way to do this without restarting or having to remote into each system. My goal is to have a batch file that adds a new admin account and remove an old one setting up the password and required rights in the process. Hope I can get some good info on this.

3 replies

by jordana

The batch file below does half of what you want. It should be a good start. You will want to use xcacls.exe found in the resource kit. You can modify what dirs you want to apply the permissions to. I would use your net user commands for the adding and deletion of the local admin user.
----begin batch file-----
@ECHO Off
REM perms.bat was writen by Jordan Arendt
REM It makes a user directory.
REM It changes the permissions on a user directory.
REM It was specifically designed for easily setting permissions
REM for user shares on the server XXXXXXXX.
REM
REM It adds full control permissions for Help Desk Group
REM It removes Everyone access.
REM Date: August 9, 2000
REM
REM Usage: perms
REM
REM Notes: username and directory name must be the same.
REM Perms.bat must be in the parent directory of the
REM directory whose permissions you want to change.
REM XCACLS.EXE must be in your path. It is a utility found
REM in the resource kit.

md %1
xcacls %1 /T /G "Help Desk":F /Y
xcacls %1 /E /G %1:F
------end batch file----------

This discussion is closed to new replies.