Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2509
  • Last Modified:

Sharepoint farm secret phrase reset

Hello Experts,

I need to connect to a SP farm which was created by default on the SBS 2011 Standard installation and I do not know the secret phrase...

I found a way with SP Management Shell to reset that secret Phrase when adding a second server to that farm but I need to be already connected to that farm.

Here is the result :
$passphrase = ConvertTo-SecureString -asPlainText -Force
*****************************
Set-SPPassPhrase -PassPhrase $passphrase -Confirm
cmdlet Set-SPPassPhrase at command pipeline position 1
Supply values for the following parameters:
ConfirmPassPhrase: *****************************
Set-SPPassPhrase : Cannot access the local farm. Verify that the local farm is
properly configured, currently available, and that you have the appropriate per
missions to access the database before trying again.
At line:1 char:17
+ Set-SPPassPhrase <<<<  -PassPhrase $passphrase -Confirm
    + CategoryInfo          : InvalidData: (Microsoft.Share...etSetPassPhrase:
   SPCmdletSetPassPhrase) [Set-SPPassPhrase], SPCmdletException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletSetPassP
   hrase

I have the permissions to access the database in SQL Management Studio.

Is there any way to reset that secret phrase before to connect to the farm with the SP Wizard ?

Thank you in advance for your help !
0
jet-info
Asked:
jet-info
  • 4
  • 4
  • 3
1 Solution
 
Brad HoweDevOps ManagerCommented:
It is a permissions issue for sure.

1. Make sure you are logged in as the FarmAdministrator account
2. Starting Powershell in elevated admin rights "Run As Administrator"
3. Open Sharepoint 2010 Management Shell and execute the following :
         Get-SPShellAdmin
    The account you are execute from should be listed. If not this is why.

Let us know,
Hades666
0
 
Justin SmithSr. System EngineerCommented:
Are you running this from the new server, or from a server in the existing SBS farm?  If the new server, that would explain the error...you can't connect to a farm that doesn't exist.

The permission that Hades posted is also a possibility.  You must have certain db roles on the config database (and any content db you want to run against) in order to execute PowerShell commands against it.  If you see that your account doesn't have it you can run Add-SPShellAdmin -UserName domain\user   - which will add the account to the config db.
0
 
jet-infoAuthor Commented:
I think there is a lack of information from me.

I had a working SP Foundation 2010 farm installed by default by SBS 2011 Std and somebody uninstalled SPF... We don't have a valid backup before that incident ! I know, I know...
Now I re-installed SPF and I want to connect to the previous farm but I do not know the secret phrase because I didn't installed it, it was installed by default on SBS 2011 std.
I can connect to the Sharepoint DB with my admin credentials (in SQL management Studio and with the SP wizard) but I am blocked by the secret phrase.

In that scenario, do you know a way to go forward ?
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
Justin SmithSr. System EngineerCommented:
In that case, there is no way to recover the passphrase.  You'll need to create a new farm and reconnect all your content and svc app databases.

http://mikessharepoint.wordpress.com/2012/02/22/forgot-farm-passphrase-to-the-only-sharepoint-server-recreate-farm-walkthrough/


______________________________________________________
Follow me on Twitter!  @justinsmith317
0
 
Brad HoweDevOps ManagerCommented:
That is correct. Start fresh and attach content DBs.  with a valid backup of your config DBs you are lost.

Sorry ;/
Hades666
0
 
jet-infoAuthor Commented:
I don't need previous Config DB, I was at the start point of my work.
The problem is that I can't even create a new farm :

1. Start the SharePoint Products Configuration Wizard as administrator. (Click Yes to reset services warning)
2. Create a new server farm -> Next
3. Specify all same settings, except input a new SharePoint Config database name. Instead of ‘SharePoint_Config’, I input ‘SharePoint_Config2'.
4. Write down a passphrase and remember it.
5. Specify port number (I leave this unchecked) and Choose NTLM or Negotiate (NTLM is most common).
6. Review the settings and Click Next to confirm.
7. Click Finish if the Configuration is successful. If not, check your logs.

An error occurs at 3/10 but the log is so big that I do not know where or what to find...
0
 
Justin SmithSr. System EngineerCommented:
Do you have proper permissions on the SQL instance?  Must have at least dbcreator and securityadmon permissions.
0
 
Brad HoweDevOps ManagerCommented:
Search your log for "ERR " and paste the results here.

Thanks,
Hade666
0
 
jet-infoAuthor Commented:
I can log in SP DB but can't add dbcreator and securityadmon permissions with my two admin accounts...
I can see a login named "sa" with SQL credentials, it must had make by SBS install...?

I give you the log errors in a moment, my VM has just crashed with very stranged display... like graphics card failure...
0
 
Justin SmithSr. System EngineerCommented:
Uh oh.  If you have no current sysadmin accounts, it's a pain.  I've had to use this before:

http://sqlserver-help.com/2012/02/08/help-i-lost-sa-password-and-no-one-has-system-administrator-sysadmin-permission-what-should-i-do/
0
 
jet-infoAuthor Commented:
Thank you so much for you very useful link !

I followed it and it works perfectly now !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 4
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now