Friday, June 16, 2017

How to Add Local admin using Command Prompt

In setting up a computer, the local admin account is set. It is the first account to used in the system to provide the local administrative access to configure the Wifi access, the network settings, and domain settings. Connecting the computer to the domain network allows organizational administrators to manage the PC as part of the organization and implement the group policy.

Sometimes, the PC become disconnected to the domain and the domain administrator cant make necessary changes to connect back to domain. Rejoining to domain requires local administrator account when the PC is experiencing domain trust relationship. The admin will not be able to login since the cache credentials is not available, or the domain admin account is never logged in to the computer. It is also possible that the local admin password is not known and the admin do not have the password for example, another person setup the laptop and the current admin was not able to reset the password when they still have the access. Due to multiple password changes of the domain admin, the cached domain admin credentials saved on the computer still have the old password. The admin would have the difficulty to use the cached domain admin account.

Prevention is better than cure and the admin can setup local admin account to the computer. It is a matter of implementation based on the policy for IT but it saves time when trying to recover from domain trust relationship problem.

In order to add a local admin to the computer, type the following command via command prompt. It can also be run remotely using Psexec.

net user adminlocal "" /add
net localgroup administrators /add adminlocal

Basically the command in the first line is an instruction to add adminlocal as a username.
The second line adds adminlocal to the local administrators group. Adminlocal username can be any username of choice.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

SSS Contribution Calculator

Enter your monthly income: