Error accessing SharePoint 2010 Managed Accounts

Symptoms

When accessing the 'Managed Accounts' page in Central Administration, the following error is seen:

Object reference not set to an instance of an object

The following can be seen in the ULS logs:

System.NullReferenceException: Object reference not set to an instance of an object.  
 at Microsoft.SharePoint.ApplicationPages.ManagedAccountsDataSourceView.FillDataTable(DataTable table, DataSourceSelectArguments selectArguments)   
 at Microsoft.SharePoint.WebControls.DataTableDataSourceView.Select(DataSourceSelectArguments selectArguments)   
 at Microsoft.SharePoint.WebControls.AdministrationDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)   
 at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)   
 at System.Web.UI.WebControls.DataBoundControl.PerformSelect()   
 at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()   
 at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()   
 at System.Web.UI.Control.EnsureChildControls()   
 at System.Web.UI.Control.PreRenderRecursiveInternal()   
 at System.Web.UI.Control.PreRenderRecursiveInternal()   
 at System.Web.UI.Control.PreRenderRecursiveInternal()   
 at System.Web.UI.Control.PreRenderRecursiveInternal()   
 at System.Web.UI.Control.PreRenderRecursiveInternal()   
 at System.Web.UI.Control.PreRenderRecursiveInternal()   
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Cause

To display the information regarding the managed accounts, the entire collection of managed accounts is enumerated. For each account, a number of properties are looked at including UserName, PasswordLastChanged and AutomaticChange. If AutomaticChange is set to true, the next scheduled change is pulled from the 'Password Generation' timer job associated with the given account. If this timer job does not exist for any accounts set to have the password automatically change, the above error will occur.

Resolution

  1. Identify the Managed Accounts that have automatic password reset enabled with the below script

    Get-SPManagedAccount | ? {$_.AutomaticChange -eq $true} | SELECT UserName
  2. Document the accounts that have an associated 'Password Generation' timer job. The timer job definitions can be found in the Monitoring section of Central Administration.
  3. For any accounts that have the AutomaticChange property set to true and do not have an associated timer job, execute the below script to change the account to no longer have the password change automatically.

    $acct = Get-SPManagedAccount "<DOMAIN>\<UserName>"
    $acct.AutomaticChange = $false
    $acct.Update()
  4. Locate the Managed Account in Central Admin and reset the Automatic Password Change schedule.
內容

文章識別碼:2711528 - 最後檢閱時間:2012年5月16日 - 修訂: 1

意見反應