locked
Changing passwords for all service accounts using Credential Management RRS feed

  • Question

  • Hello,

    I want to change passwords for service accounts:
    1. Account which was used to setup farm.
    2. Account for administering farm.
    3. Account for user profile service
    4. Account for search service.
    5. Account for other service applications..
    6. Account for application pools.
    7. Account for crawling.

    I would like to do this using Credential Management. It allows to generate passwords based on the password rules from AD.
    But two things are not clear for me:
    1. In case I change password from the Credential Management, I'll need to update password manually for application pools, or services (in services.msc), or on the SQL?
    2. How can I get a new password? There is no option to send new password by email.
    Wednesday, June 10, 2020 2:35 PM

Answers

All replies

  • Below article is the best guide to change the password of the service accounts.

    https://social.technet.microsoft.com/wiki/contents/articles/36418.sharepoint-2013-how-to-change-all-service-account-passwords.aspx

    First you should change the password of the account in AD and then change the password of the application pool account in SharePoint farm. you can update the password from Central Admin UI as well.

    If you want to use an existing password, you could use PowerShell command below.

    Add-Pssnapin "Microsoft.SharePoint.PowerShell"
    
    Set-SPManagedAccount -Identity $username -ExistingPassword $newpassword  -UseExistingPassword:$true

    Below articles with similar questions:

    https://social.technet.microsoft.com/Forums/en-US/cd758ab7-ff48-46c5-840e-c7dde4d68d47/changing-service-account-passwords?forum=sharepointadmin

    https://social.technet.microsoft.com/Forums/en-US/24003c2e-2a96-41f9-940a-30131ec4e96b/change-service-accounts-postinstallation?forum=sharepointadmin

    Thanks & Regards,


    sharath aluri

    Wednesday, June 10, 2020 5:54 PM
  • Hi Oleh, 

    If Sharath's reply helps you, please remember to mark it as an answer.

    Thanks for your understanding. 

    Best Regards, 

    Lisa Chen 

    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, June 11, 2020 2:46 AM
  • Thank you. First question is clear. 

    I would like to clarify my second question. In case I use option provided by Credential Management to generate a new password for account, how I can get this password?


    Friday, June 12, 2020 1:05 PM
  • You cannot set the password/automatically update the password for all of those accounts. The UPSA Sync, Search crawl, and any Secure Store credentials must be manually reset and then set within Central Admin/PoSh. Passwords can be decrypted via:

    function Bindings()
    {
        return [System.Reflection.BindingFlags]::CreateInstance -bor
        [System.Reflection.BindingFlags]::GetField -bor
        [System.Reflection.BindingFlags]::Instance -bor
        [System.Reflection.BindingFlags]::NonPublic
    }
    function GetFieldValue([object]$o, [string]$fieldName)
    {
        $bindings = Bindings
        return $o.GetType().GetField($fieldName, $bindings).GetValue($o);
    }
    function ConvertTo-UnsecureString([System.Security.SecureString]$string) 
    { 
        $intptr = [System.IntPtr]::Zero
        $unmanagedString = [System.Runtime.InteropServices.Marshal]::SecureStringToGlobalAllocUnicode($string)
        $unsecureString = [System.Runtime.InteropServices.Marshal]::PtrToStringUni($unmanagedString)
        [System.Runtime.InteropServices.Marshal]::ZeroFreeGlobalAllocUnicode($unmanagedString)
        return $unsecureString
    }
    
    Get-SPManagedAccount | select UserName, @{Name="Password"; Expression={ConvertTo-UnsecureString (GetFieldValue $_ "m_Password").SecureStringValue}}


    Trevor Seward

    Office Apps and Services MVP



    Author, Deploying SharePoint 2019

    Author, Deploying SharePoint 2016

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Friday, June 12, 2020 1:31 PM

  • Hi Oleh, 

    Please remember to mark the helpful post as answers.

    Thanks for your understanding. 

    Best Regards, 

    Lisa Chen 

    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, June 22, 2020 8:33 AM
  • Hi Oleh, 

    Is there anything update?

    Best Regards, 

    Lisa Chen 

    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Thursday, July 2, 2020 9:10 AM