Plesk users passwords

If you need to get your Plesk users’s password, the information is stored in a database named psa and in a table named accounts.  The passwords are not hashed, they are only stored as BLOBs in Plesk 10 or later (previous versions were clear text) so a simple CONVERT can list them.

Start mysql and prompt for password.  Then select database to use.

mysql -p
mysql> use psa

Run the query (Plesk 10)

SELECT
a.id,
CONCAT(m.mail_name,"@", d.name) AS email_address,
CONVERT(a.password USING utf8) AS password
FROM mail m
LEFT OUTER JOIN domains d on d.id=m.dom_id
LEFT OUTER JOIN accounts a ON a.id=m.account_id

Optionally, you can add the following search criteria

WHERE d.name IN ('domain1.com','domain2.com')

References:

OpenVZ / Proxmox – How to share folders between VMs or between Host and VM

Notes:

  • This must be run on hardware node (host)
  • Replace 102 with your container ID (Id of virtual machine)
  • Create /common-stuff folder in VM before restarting
 vi /etc/vz/conf/102.mount

paste:

#!/bin/bash
source /etc/vz/vz.conf
source ${VE_CONFFILE}
mount -n --bind /common-stuff ${VE_ROOT}/common-stuff
 chmod +x /etc/vz/conf/102.mount

Restart VM

Sources:

BizTalk and OAGIS xsd – building Component_Schemas

I tried following this procedure to use OAGI schema in BizTalk and got a few problems so here are the solutions.

Problem #1
On build of project Component_Schemas:

Error: Node “<Schema>” – This schema file has a TypeName that collides with the RootNode TypeName of one of its root nodes.

Solution #1
For all errors, select the “<Schema>” node and change the RootNode TypeName property to something unique.  What I did was to add the folder name to the current TypeName.

Problem #2
On build of project Component_Schemas:

Error: The type or namespace name ‘SerializableAttribute’ does not exist in the namespace ‘ProjectName.System’.
Error: The type or namespace name ‘NonSerializedAttribute’ does not exist in the namespace ‘ProjectName.System’.

Solution #2
According to this article on Microsoft’s website, the problem happens because some xsd files are stored is a folder named “System”. Sadly for us, OAGIS uses a folder structure with a folder named system.

  1. In Solution Explorer, expand ”System” folder.
  2. Click each file in the System folder and in any subfolders, and then change the namespace entry in the Properties window so that any occurrence of System becomes _System. For example, change the MyProject.System.SubFolder namespace to the MyProject._System.Subfolder namespace.

 

Remote Desktop Session automatic logoff on Windows 2008 R2

This is another annoying setting in Windows 2008 R2, especially when a virtual machine is used for development.  To deactivate the automatic logoff of a disconnected session in Windows Server 2008 R2…

  1. Go to Administrative Tools > Remote Desktop Services > Remote Desktop Session Host Configuration
  2. Select top left node (RD Session Host Configuration)
  3. In the middle window, right-click on RDP-Tcp and click Properties
  4. On the Sessions tab, change the End a disconnected session to the wanted value.

SharePoint 2010 – fix changing computer name

If you have a SharePoint installation and for some reason you changed the name of the machine on which the SQLServer instance is running, SharePoint won’t be able to connect to the database server anymore. The reason is because SharePoint stores the computer name (netbios name) in many places in its configuration database.  In order to fix this issue, you must reconfigure SharePoint to let it know the new SQL Server location.

On my developer machine (Windows 7), I installed SharePoint as suggested by Microsoft for developer computers so this creates a separate instance for SharePoint on the local SQL Server.  It is not required to enter the instance name when you configure the server, only the computer name will be enough.

The following steps are based on Pinal Dave’s procedure he posted on his blog: http://www.sqlauthority.com. Great blog by the way, go take a look!

1- Start SharePoint 2010 Management Shell (Run as administrator)

2- Run the following command:

stsadm -o setconfigdb -databaseserver myComputer -farmuser myDomain\myUser -farmpassword myPassword

NOTE: This might take several minutes to complete.

3- Go into Internet Information Services Manager

4- Remove the SharePoint Central Administration v4 site. It will be re-created automatically later.

5- Run the SharePoint 2010 Products Configuration Wizard

6- Click Next > on the Welcome Screen.  NOTE: You might need to run the SharePoint Configuration Wizard twice if the removed administration site is not created the first time.

7- You’re done, you should now be able to connect to your SharePoint Central Administration website.

Next time you configure your SharePoint server, do it with database aliases instead of server names.

SSRS report execution time

This query will list the 100 reports that took the longest time to run today.

You must be connected to the SSRS engine, not the database engine.

use [ReportServer]
select top 100
datediff(s,EL.TimeStart,EL.TimeEnd) as 'Runtime(secs)',
C.Name, EL.Status, EL.Username, EL.TimeStart, EL.TimeEnd,
EL.TimeDataRetrieval/1000 as TimeDataRetrieval, --Time it took to get the data from the datasource
EL.TimeProcessing/1000 as TimeProcessing, --Time it took to group, filter, aggregate and subreport
EL.TimeRendering/1000 as TimeRendering, --Time it took to render, page, expression evaluation
(EL.TimeDataRetrieval + EL.TimeProcessing + EL.TimeRendering)/1000 as TotalRunTime,
C.Path, EL.Parameters
from dbo.ExecutionLog EL
Inner Join dbo.Catalog C on EL.ReportID=C.ItemID AND C.type=2 --Type=Report
where EL.TimeStart >= DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) --Today
order by 'Runtime(secs)' desc

Enable Copy Paste in vSphere client for VMware ESXi 4.1 and later

Ever tried to copy-paste from your computer to a VMWare virtual machine through the vSphere Client?  Not working?  Well, that’s normal according to VMWare.  Starting with vSphere 4.1, copy-paste is disabled by default.  See here for reference on VMWare website.

Here is an easy way to enable it for all VMs at once.

  1. Log into the service console.  If you are not familiar on how to do that, click here to see my quick post on the subject.
  2. Edit file /etc/vmware/config
    vi /etc/vmware/config
  3. Add the following two lines to the end of the file
    isolation.tools.copy.disable="FALSE"
    isolation.tools.paste.disable="FALSE"


    If you’re not familiar with vi text editor, this step can be a bit tricky so here are detailed steps.

    1. Once in vi editor, before doing anything, press the “i” key, this will enable insert mode.
    2. Scroll to the end of the file and to the end of the line and press Enter to add a blank line.
    3. Copy the text and paste it using your right mouse button.
    4. Press ESCAPE key to go out of insert mode
    5. Type “:wq” command to write the file and quit
  4. You’re done. Config will be enabled on the next reboot of each VM.

Note: These options do not persist after an upgrade. If you upgrade to a newer version after enabling these options, the changes are lost and you may have to re-enable them.

Access VMWare ESXi v4.1 and later SSH service console

VMWare service console is not hidden anymore (starting with 4.1), here is how to enable its remote (SSH) access.

1- In vSphere Client, click on the ESXi host and go to Configuration tab and then on Security Profile.

2- Click on Properties (upper right) and then select Remote Tech Support (SSH) and click Options.

3- In Remote Tech Support (SSH) window, select Start and stop with host and then click OK on the two opened windows.

4- Use your favorite SSH application (mine is ExtraPutty) and connect to the remote console.  IP is the same you use to connect to vSphere client and the port is the standard SSH port: 22.  Username and password are also the same as vSphere client.

That’s it, you’re now ready to screw things around pretty badly!