?
Solved

Sharepoint farm secret phrase reset

Posted on 2013-01-11
11
Medium Priority
?
2,397 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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
 

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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Suggested Courses

615 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