Link to home
Start Free TrialLog in
Avatar of scarm
scarmFlag for United States of America

asked on

Need help creating local users on domain computers.

I need to create a local user on all of my computers in my Active Directory domain.  These computers are running XP SP2.  I need a script, batch file, GPO, or some other means to do it as painless as possible.  I don't need to worry about the group membership.  I have that part covered.

I have tried using WMI via VBS.  I have also tried using a batch file using the net user /add command with no luck.  I keep getting an "access denied" even though I'm running this as a Domain Admin on the computer.

If I run the command from a command prompt "net user Joe_Dirt StinkyPants123 /add"  (Joe_Dirt being username and StinkyPants123" being the password, the command completes successfully, and I have a new local user account.  BUT, if I put this command in a batch file, it comes up with a "System Error 5 has occurred" which is a permissions issue.  I don't know why it will work when running the command manually at a command prompt, but it won't do it running via a batch file even though I'm using a Domain Admin account to run each.  I get similar "Access Denied" errors when running vbscripts as well.

Please NOTE:  I need a LOCAL user on a DOMAIN computer.  These are not Domain users even though they are logged into a domain.

Any and all help would be greatly appreciated!  Thanks in advance!
Avatar of LauraEHunterMVP
Flag of United States of America image

Have you tried lg.exe, from  Awesome freeware piece to create/manage local users/groups, often succeeds where the net * commands let me down.
Avatar of scarm


The LG.exe program only manages groups.  I do not need to manage groups.  I need to add a local user account to the computer.  I don't care about group membership with the relation to this question.  I can take care of the group via the GPO's Restricted Groups.

I want to create a user "LocalPC\Joe_Dirt" not "domain\Joe_Dirt".
Avatar of scarm
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial