Solved

Is there a way to remove and/or create local user accounts through gpo?

Posted on 2014-09-27
3
2,000 Views
Last Modified: 2014-10-09
Is there any way to remove or add Local User accounts using your domain's group policy?

I have a bunch of local admin accounts on the network that I would love to delete without doing them one by one as they have no password protection.

Also, I would love to create new ones through GPO as well.
0
Comment
Question by:MJCS
3 Comments
 
LVL 12

Expert Comment

by:Steven Wells
ID: 40348021
you can use restricted group memberships policy.
This will remove any user account from the administrators group. You can't create or delete accounts via Gpo, but you can control access to wha those accounts can do.
0
 
LVL 25

Expert Comment

by:Mohammed Khawaja
ID: 40348137
It can be done by running a computer account GPO to run a login script.  Below are sample commands:

net user /add jim.smith P@$$w0rd1  (create user jim.smith with password of P@$$w0rd1)
net localgroup administrator jim.smith /add  (add jim.smith to local administrators groups)
net localgroup administrators domain1\user1 (add user1 from domain1 to local administrators group)
0
 
LVL 54

Accepted Solution

by:
McKnife earned 500 total points
ID: 40348450
Both create and delete are administrative operations and cannot be done by a login script. Use a startup script to delete those accounts.
Net user /delete accountname
As for creating, there are many ways, but some of them should be avoided as they put your whole domain in danger. Don't use a startup script using plain text passwords...the risk is, that those get read out and your machines get owned.
There used to be a way through GPO, but Microsoft has recently closed that road after admitting how dangerous it was. They advise you to use this https://support2.microsoft.com/kb/2962486?wa=wsignin1.0 ->look at the workaround paragraph.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

685 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