Solved

Sharepoint farm secret phrase reset

Posted on 2013-01-11
11
2,070 Views
Last Modified: 2013-01-14
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
Comment
Question by:jet-info
  • 4
  • 4
  • 3
11 Comments
 
LVL 30

Expert Comment

by:Brad Howe
ID: 38766886
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
 
LVL 38

Expert Comment

by:Justin Smith
ID: 38766915
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
 

Author Comment

by:jet-info
ID: 38767038
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
 
LVL 38

Expert Comment

by:Justin Smith
ID: 38767054
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
 
LVL 30

Expert Comment

by:Brad Howe
ID: 38767073
That is correct. Start fresh and attach content DBs.  with a valid backup of your config DBs you are lost.

Sorry ;/
Hades666
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:jet-info
ID: 38767152
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
 
LVL 38

Expert Comment

by:Justin Smith
ID: 38767175
Do you have proper permissions on the SQL instance?  Must have at least dbcreator and securityadmon permissions.
0
 
LVL 30

Expert Comment

by:Brad Howe
ID: 38767199
Search your log for "ERR " and paste the results here.

Thanks,
Hade666
0
 

Author Comment

by:jet-info
ID: 38767462
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
 
LVL 38

Accepted Solution

by:
Justin Smith earned 500 total points
ID: 38767497
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
 

Author Closing Comment

by:jet-info
ID: 38773765
Thank you so much for you very useful link !

I followed it and it works perfectly now !
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now