Solved

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

Posted on 2014-09-27
3
1,613 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 53

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

932 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now