Local Administrator Password Management Detailed Technical Specification
Local Administrator Password Management Detailed Technical Specification
Local Administrator Password Management Detailed Technical Specification
Authors:
Tom Ausburne, Microsoft
Jiri Formacek, Microsoft
2 AD Preparation.......................................................................................................5
2.1 Modifying the Schema.........................................................................................................5
2.2 Permissions.........................................................................................................................6
2.2.1 Removing Extended Rights.........................................................................................................6
2.2.1.1 Inherited Permissions.............................................................................................................6
2.2.1.2 Direct Permissions..................................................................................................................7
2.2.2 Adding Machine Rights...............................................................................................................8
2.2.3 Adding User Rights......................................................................................................................8
3 Group Policy..........................................................................................................10
3.1 Changing the Group Policy Settings...................................................................................10
3.2 Enabling the local administrator password management.................................................10
3.3 Password parameters........................................................................................................10
3.3.1 Administrator account name....................................................................................................11
3.4 Protection against too long planned time for password reset..........................................12
4 Managing Clients...................................................................................................13
4.1 Viewing password settings................................................................................................13
4.2 Resetting the password.....................................................................................................16
5 Troubleshooting....................................................................................................17
5.1 Event Logging and Auditing...............................................................................................17
5.1.1 Client Logging............................................................................................................................17
5.1.2 Event IDs....................................................................................................................................17
5.2 Problem Scenarios.............................................................................................................19
5.3 Auditing.............................................................................................................................21
1 Installation
There are two parts to the installation, the management computers and the clients you want to
manage.
The installation of binaries and related files is handled by the MSI package. This will install the
following:
- GPO CSE: must be present on each managed machine
- Management tools:
o Fat client UI
o PowerShell module AdmPwd.PS
o Group Policy Editor admin templates
The default is to install the CSE only. The management tools are installed on demand.
File Reference
The installation for the Fat client UI is done to folder:
%ProgramFiles%\LAPS
AdmPwd.UI.exe
AdmPwd.Utils.config
AdmPwd.Utils.dll
The installation for the PowerShell modules is done to folder:
%WINDIR%\System32\WindowsPowerShell\v1.0\Modules\AdmPwd.PS
AdmPwd.PS.dll
AdmPwd.PS.format.ps1xml
AdmPwd.PS.psd1
AdmPwd.Utils.config
AdmPwd.Utils.dll
%WINDIR%\System32\WindowsPowerShell\v1.0\Modules\AdmPwd.PS\en-us
AdmPwd.PS.dll-Help.xml
The installation for the CSE is done to folder:
%ProgramFiles%\LAPS\CSE
AdmPwd.dll
The installation for the Group Policy files is done to folders:
%WINDIR%\PolicyDefinitions
AdmPwd.admx
%WINDIR%\PolicyDefinitions\en-US
AdmPwd.adml
1.1 Management Computers
Double click on the appropriate MSI installer for your platform (LAPS.<platform>.msi) to get started.
Click Next.
Click Install.
Click Finish.
1.2 Managed Clients
This installation uses the same install files, AdmPwd.Setup.x64.msi and AdmPwd.Setup.x86.msi as
on the management computers. These can be installed/updated/uninstalled on clients using a
variety of methods including the Software Installation feature of Group Policy, SCCM, login script,
manual install, etc.
If you want to script this you can use this command line to do a silent install:
msiexec /i <file location>\LAPS.x64.msi /quiet or
msiexec /i <file location>\LAPS.x86.msi /quiet
Alternative method of installation to managed clients is to copy the AdmPwd.dll to the target
computer and use this command:
regsvr32.exe AdmPwd.dll
Note: If you install by just registering the dll it will not show up in Program and Features as shown
below.
To update the Schema you first need to import the PowerShell module. Open up an Administrative
PowerShell window and use this command:
Import-module AdmPwd.PS
Note: If you have an RODC installed in the environment and you need to replicate the value of the
attribute ms-Mcs-AdmPwd to the RODC, you will need to change the 10 th bit of the searchFlags
attribute value for ms-Mcs-AdmPwd schema objet to 0 (substract 512 from the current value of the
searchFlags attribute). For more information on Adding Attributes to or Removing attributes
from the RODC Filtered Attribute Set, please refer to http://technet.microsoft.com/en-
us/library/cc754794(v=WS.10).aspx.
2.2 Permissions
The Active Directory infrastructure offers advanced tools for implementation of the security model
for this solution by allowing for per-attribute Access Lists (ACLs) and implementing confidential
attributes for password storage. There are four sets of rights that need to be modified.
If the output is truncated as the number of trustees having permissions is long, focus on a specific
OU and run:
Find-AdmPwdExtendedrights -identity Memphis | Format-list
ObjectDN : OU=memphis,OU=members,DC=herbertm01,DC=lab
ExtendedRightHolders : {NT AUTHORITY\SYSTEM, HERBERTM01dom\Domain Admins,
contoso-dom\Member-HelpDesk1-Memhpis}
Repeat this procedure for any additional OUs that contain computer accounts that are in scope of
the solution and are not subcontainers of already processed containers.
Note: You can use multiple groups and users in the same command separated by comma.
Example:
Note: You can use multiple groups and users in the same command separated by comma.
Example:
3.4 Protection against too long planned time for password reset
If you do not want to allow setting planning password expiration of admin account for longer time
than maximum password age, you can do it in GPO:
4 Managing Clients
The password is stored in plain text. The Expiration date is stored as the number of 100-nanosecond
intervals that have elapsed since the 0 hour on January 1, 1601 untill the date/time that is being
stored. The time is always stored in Greenwich Mean Time (GMT) in the Active Directory. If you
want to manually convert it use this command:
w32tm /ntte <number you want to convert>
There is also a graphical interface available. When you install the program on a computer where
you want the ability to easily retrieve the password just select the Fat client UI option.
The program you want to run is C:\Program Files\LAPS\AdmPwd.UI.exe. It will be in the menu and
looks like this:
Or this on Windows 7.
Launch the interface, enter the client name and click Search.
What happens if a user who hasn’t been granted rights to see the local Administrators password
tries to access it? If they were to gain access to the GUI interface the password won’t be displayed.
If they have installed the RSAT tools and run Active Directory Users and Computers (ADUC) to view
the password it will show as <not set>.
This information is not seen because the extended rights were removed and only certain individuals
and groups were granted the rights to see this.
Value Meaning
0 Silent mode; log errors only
When no error occurs, no information is logged about CSE activity
This is a default value
1 Log Errors and warnings
2 Verbose mode, log everything
Note: Generally, all events with severity “Error” are blocking. When any error occurs, no other tasks
are performed and CSE terminates processing.
5.2 Problem Scenarios
Symptom: Client gets Event ID 7, “Could not write changed password to AD. Error 0x80070032” in
the Event log.
Solution: The client is not in a managed OU. Move it to a managed OU or run the PowerShell
commands to add the Machine Rights to the OU the client is in.
Symptom: When importing AdmPwd.PS module, you get error “ Import-Module: Could not load file or
assembly 'file:///C:\Windows\system32\WindowsPowerShell\v1.0\Modules\admpwd.ps\AdmPwd.PS.dll' or
one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and
cannot be loaded.”
Solution: You need to allow PowerShell to load .NET Framework 4. To allow this, you need to change
powershell.exe.config to contain this:
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0.30319"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
Symptom: Everything is installed but the password isn’t updating on the client and nothing is logged
in the Event Log.
Solution: The CSE hasn’t been enabled with a Group Policy that applies to the client. Set the policy
“Enable local admin password management” to Enabled
Symptom: After running the Schema update, the new attributes aren’t showing in the computer
properties.
Solution: If the status of the Schema update was successful you may be experiencing replication
issues or latency. In larger environments this attribute population may take some time to
propagate.
Symptom: Users that haven’t been specifically granted permissions can still see the password.
Solution: This is usually due to not removing the “All Extended rights” permission from groups and
users. Check the effective rights on the computer in question.
5.3 Auditing
Auditing users who successfully query and read the local administrator password for a computer can
be accomplished by using a PowerShell cmdlet. You may need to run Import-module AdmPwd.PS
if this is a new window.
Set-AdmPwdAuditing –OrgUnit: <name of OU on which you want to setup the auditing>
-AuditedPrincipals: :<identification of users/groups whose access to password shall be
audited>
When a password is successfully read, a 4662 event is logged in the Security log of the Domain
Controller.
You will notice that the schemaIDGUID is reflected in the Event properties.