Category Archives: Solutions

Various solutions and quickfixes discovered during the course of normal life.

Resetting passwords in Avast! ADNM Console

Passwords get lost.
It is a simple reality of the security conscious technology driven world we live in.  That and password complexity rules which make differential calculus look simple.

So, imagine our surprise when we lost forgot an administrator password to one of our Avast! Antivirus ADNM console installs.

Fortunately for us, there is a quick and painless solution.

Prerequisites
You must have read/write access to the avast database created when you setup your Avast! corporate editions.

How to change a password in Avast!

    1. Make sure the prerequisites are met
    2. Logon to the avast SQL database
    3. Execute the following query

SELECT *
FROM dbo.[User]

    1. Note the ObjectId for the user you wish to reset the password on
    2. Execute the following update query

UPDATE dbo.[User]
SET Password = ‘[Reset Password Goes Here]’
WHERE ObjectId = [ObjectId of User Goes Here]

  1. To re-encrypt the password, set the password via the ADNM console.

Much easier than reinstalling!

Uninstalling the .NET Framework… the hard way

One of our clients recently lost a server due to a hard drive controller failure.  While RAID was enabled, the controller failure resulted in some odd corruption on the server.  After restoring all the necessary backups, we noticed that the .NET based applications would not launch.  Odd… .NET is installed, I can see the v2.0.50727 directory, it all seems to be installed.

Pulling out the old book of first line of support tasks, we

1st: we attempted to reinstall dotnetfx.exe (.NET 2.0)
This failed with the following error

Setup cannot continue because this version of the .NET Framework is incompatible with a previously installed one. For more information, see http://support.microsoft.com/kb/906894.

2nd: we attempted to uninstall the .NET framework via the Add/Remove programs function
This failed with a “cannot launch uninstall package”. 

3rd: we attempted to manually uninstall and reinstall the .NET framework via the Microsoft recommended methods documented at http://support.microsoft.com/kb/908077.  During the reinstall of dotnetfx.exe, we once again received the “Setup cannot continue because this version of the .NET Framework is incompatible…” error
(Side note:  Finding and downloading the MSICUU2.EXE tool proved to be remarkably difficult.  For future reference, I have included the installer file at this link)

 

Then we remember an article we read a couple of years ago about a .NET clean-up tool which works wonders on corrupted .NET installs.  The tools is available at

http://blogs.msdn.com/b/astebner/archive/2008/08/28/8904493.aspx

We ran the tool, reinstalled .NET and all was well on the server…. at least until next time

Using Host Headers and SSL in IIS 7 (without the ugliness of appcmd)

Microsoft SharePoint is an amazing tool for collaboration and information sharing.  At AIS, we make extensive use of SharePoint portals to serve up a variety of informational goodies.

For those of us using SharePoint, we love the support for sub-domains for each SharePoint Web Application.  It is very common to see SharePoint URLs such as

http://hr.mycompany.com
http://development.mycompany.com
http://portal.mycompany.com

Using Host Headers in IIS, implementing SharePoint Web Applications on a single IIS server using a single IP is a trivial mater.  So trivial that the SharePoint Application Management wizard sets it all up for you!

Trivial; until you start to see sub-domains such as

http://payroll.mycompany.com
http://secure.mycompany.com

For secure data, such as payroll, most companies will start thinking about SSL to encrypt the data between the server and the browser.  And so begins the trouble.

 

IIS, by default, only supports binding of an SSL certificate to ONE SharePoint web application (or any website on the server).  Under default conditions, you must choose between securing the payroll or the secure site using SSL.  You cannot bind the SSL certificates to both.

Of course, there are several well documented methods for binding SSL certificate(s) to multiple host headers.  The problem is they require using the arcane command line function appcmd.  Doable, but not trivial.

 

Fear not, there is an easier way!

 

IIS 7 supports what appears to be an undocumented feature for SSL and Host Headers.  You simply preface the SSL certificate’s friendly name with an asterisk.

 

Here is how you do it:

Assumptions

  • You have a valid SSL certificate already installed on your IIS server
  • The SSL certificate matches your sub-domain URL
  • You have access to the IIS Manager
  • Coffee is brewing, ready to go when you are done

Instructions

  1. Open Internet Information Services (IIS) Manager
  2. Edit the Site Bindings for the website you which to assign an SSL certificate to
    (right click, select Edit Bindings
  3. Select the HTTPS port and select Edit
  4. Note that the Host Name (Host Header) field is unavailable for editingimage 
  5. Launch the Microsoft Management Console (MMC)
    1. Select Start –> Run
    2. Type in “MMC” and hit enter
    3. From the console, select File –> Add / Remove Snap-in
    4. Select Certificates from the Add / Remove dialog
    5. Select Computer Account when prompt for which certificates the snap-in will manager.
    6. Select Local Computer when prompted
    7. Click OK to add the Snap-in to the MMC
  6. Locate your SSL certificate
    1. For self-signed (SELFSSL), look in Personal
    2. For installed / purchased, look in the appropriate folder the certificate was originally installed in
  7. Right click on the certificate and select properties
  8. Edit the Friendly Name field so the name starts with an *
    image 
  9. Repeat steps #1 – 3 above
    Note that the Host Name (Host Header) field is now available for editing
    image

 

Happy Bindings!

(Coffee Time)