Solved

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

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
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 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 show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

792 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