Automatically and quickly replacing text in few files

Preface

In some cases it is necessary to replace text in some text files. Unfortunately this is a really inconvenient work because we need always copy the proper text to the clipboard then we need to switch the window then highlighting the old text part and then pasting the text from the clipboard. If we have only one text file where the text is need to be replaced then it is fine but if we have more text files then one that is a really annoying something.

Solution

Fortunately VBS language is able to help us. I know the VBS is a bit old school but sometimes we do not have opportunity having PowerShell. Of course it is possible installing PowerShell to Windows Server 2003 but like I said sometimes it is simple not allowed to do it. So VBS is the forever alternative.

Continue reading “Automatically and quickly replacing text in few files”

Advertisements

Drives used for SQL databases are running out of free space – Health Analyzer rule

Introduction

Health Analyzer does a great job warning you about possible problems on your platform, however it is extremely hard to stay on the good side (meaning it does not reward you with a red bar in Central Administration) without turning off a couple of rules.

I met with the Drives used for SQL databases are running out of free space message a few times and the other day reading the official documentation and feeling a bit confused and disappointed I decided to check out what this is about under the hood.

 

Continue reading “Drives used for SQL databases are running out of free space – Health Analyzer rule”

Sharepoint integrated reporting services with SQL Always on availability group

It happened once that i needed to provision a Sharepoint 2013 farm including MS SQL Server Reporting Services (SRSS). I had some issues – maybe you found this post ‘cos of that – which i would also share and give a hint on the solution.

Continue reading “Sharepoint integrated reporting services with SQL Always on availability group”

Say bye-bye to the old trusty MD5

It is official: Microsoft is one of the big ones who’ll be retiring the venerable-but-vulnerable MD5 algorithm. Don’t worry, you’ll still be able to create MD5 hashes for your documents and verify them, but not for authentication and code signing anymore.

md5_logo_n1
The first chink in MD5’s armor was discovered in 1996; while not critical (MD5 creates 128-bit hashes – the vulnerability is in one of the 64 steps to create the hash value) security experts began recommending alternate algorithms. Both recommended replacement hash functions became obsolete since then.

How big of a security risk was the 1996 announcement? When something like this comes up, cryptoanalysts begin investigating, and creating scenarios, how the fuction can be compromised. It took 8 years, and an unimaginable increase in computing power to crack the MD5 hashing algorithm. The server the chinese analysts demonstrated on (a pSeries IBM) reportedly had 24 Power processors and 1TB RAM – to find a collision with a randomly given MD5 hash took less, than 1 hour.

power6
What is a collision? Basically you take two files which differ in size and (obviously) content, you run your favourite md5sum command on them, and surprise-surpise, the files got identical hashes. No big deal, really? Imagine then what horror Adobe’s programmers felt, when _all_ their user data, passwords, hints, everything was leaked. The passwords were of course left encrypted, but savvy users soon found by sorting the data by password hash, that there were many similarities, even when the password hints indicated completely different. In MySQL databases you have the option to have your fields be MD5 encrypted, and many authentication algorithms simply create a hash when you put your password in the password field, and then compare it to the stored value in the sql database.

login_field

Using the cracking method outlined in the 2004 announcement, and some (cheap!) hardware, a password can be created from an MD5 hash value. It won’t be the original password, but since the hashed value will be the same – you’re in like Flynn. The hardware required is really not on the same level as in 2004 – today you can use the just about anything with a processor in it, a powerful GPU is one way, or use your bitcoin-mining FPGAs to create a program that just runs the blocks over and over, hundered million times a second. The only good thing about the published methods is, that you won’t be able to decode the orignal password, just replicate it with something that will be accepted as your password.

Read about the update in more detail on Microsoft’s website: Technet
Read about the MD5 function, its history, and the vulnerability: Wikipedia
Check if your personal data was leaked: ZDNet

SharePoint 2013 Configuration Wizard fails with SQL Server max degree of parallelism error

Recently I tried to install SharePoint 2013 in my test environment based on the multiple servers for a three-tier farm scenario, where my SQL Server is on another machine and I got the following error during SharePoint 2013 Products Configuration Wizard:

Failed to create the configuration database

Exception: Microsoft.SharePoint.SPException: This SQL Server instance does not have the required “max degree of parallelism” setting of 1. Database provisioning operations will continue to fail if “max degree of parallelism” is not set 1 or the current account does not have permissions to change the setting.  See documentation for details on manually changing the setting.

Max degree of parallelism error
Max degree of parallelism error

I encountered this during farm creation on the first SharePoint server installation.

Continue reading “SharePoint 2013 Configuration Wizard fails with SQL Server max degree of parallelism error”

Mystery at Sharepoint Land

Although my site did not contain so much information and data Sharepoint told me that i reached the Storage Quota limit had been given to the site ->

Your changes could not be saved because this SharePoint Web site has exceeded the storage quota limit. You must save your work to another location.  Contact your administrator to change the quota limits for the Web site.

Of course the first step was to go to the “Recycle bin” to empty it. But after this procedure  i got the same error. Ohh yes, the secondary Recycle bin for the Site collection – with Site admin right i was able to delet all the contects of that bin also.

But still got this rude error message. What’s up here?

Continue reading “Mystery at Sharepoint Land”

Cannot connect to database master at sql server – Checklist

The problem

You get the following error during SharePoint 2013 Products Configuration Wizard on the Specify Configuration Database Settings page:

Cannot connect to database master at sql server <Servername>. The database might not exist, or the current user does not have permission to connect to it.

Cannot connect to database master at sql server
Cannot connect to database master at sql server

Checklist

Your first move should be the following: Try it again, but this time mark the time between you press Next > and when the error message pops up.

Based on this:

  • if its more than a few seconds, you have network connectivity issue or SQL server configuration problem (start from no 1)
  • if it pops up almost instantly, you have permission problems on the SQL server instance (See no. 10 and 9)

Continue reading “Cannot connect to database master at sql server – Checklist”