Linux – Extract Files from an RPM file.

Make sure you copy the rpm to a temp area to extract the files.

# rpm2cpio somerpm | cpio -idmv

Windows Performance Monitor – Data Collector Sets

When you create a Data Collector Set in Windows 2012 server, the task is disabled in the Task Scheduler. You will find it under Microsoft/Windows/PLA. Just right mouse click the task and select Enable. Then, you right mouse click on it again and select Run to start it. They really should have allowed that from within Performance Monitor.

IIS Redirect from http to https

Windows Server 2012 fully updated.
IIS version 8.
Exchange 2010 fully updated.

Initially, I tried doing this with the default “HTTP Redirect.” I simply wanted to have a more generic DNS name using HTTP to redirect to the Outlook Web Access URL using HTTPS. This introduced to a couple issues. One, I needed to have SSL not be required for the “Default Web Site”, and two, I created a loop since the redirect will apply to all virtual directories below the “Default Web Site.”

I discovered the “URL Rewrite” module below:

Previously, I had used rewrite rules in Apache to accomplish a similar task, so I knew I was on the right track.

First thing you have to do is get the SSL settings right. For this I used the IIS Manager UI. I wish I had taken the time to find out how to do this with PowerShell, and here is why. For the “Default Web Site”, you open “SSL Settings” and uncheck “Require SSL.”. Now, when you do this, it will change it for all your virtual directories. So, you have select each virtual directory, open “SSL Settings”, and check “Require SSL.” Ugh.

Once that is done, install the “URL Rewrite” module. It is pretty straight forward. Once it is installed, you need to restart IIS using “iisreset”. Back in IIS Manager, select “Default Web Site” and you will notice a “URL Rewrite” icon as been added. Open it up and click “Add Rule..” under the Action menu. You give it a name, and the pattern to match. The “Action type” is “Rewrite”, and the “Rewrite URL” is where you put the HTTPS url.

Here is what I used to redirect http://mail to
Pattern: Matches the Pattern
Using: Regular Expressions
Pattern: http://mail
Ignore case: checked
No Conditions added.
No Server Variables added.
Action type: Rewrite
Rewrite URL:
Append query string: checked
Log rewritten URL: unchecked
Stop processing of subsequent rules: unchecked

Quickly create an MD5 string in linux.

$ echo -n “mysupersecretpassword” | md5sum
117a520adbd19eff51100215aa7a7fbf –

I had to use this to change the Joomla 3 password stored in a MySQL database that I forgot for the only account I had created.

MySQL> UPDATE wxyz_users SET PASSWORD=’117a520adbd19eff51100215aa7a7fbf’ WHERE username=’myadminaccount’;

Exchange mailbox error – get-mailbox

I got the following error when trying to look at mailbox using EMS from an Exchange 2010 server. The mailbox was on an Exchange 2003 server.

WARNING: The object MY.DOMAIN/MYOUs/Firstname Lastname has been corrupted, and it’s in an inconsistent state. The following validation errors happened:
WARNING: Property expression “FLastname” isn’t valid. Valid values are: Strings that includes ‘@’, where ‘@’ cannot be the last character

It turns out that this issue was the userPrincipalName attribute for the user. It probably was missed in the migration from a Windows NT4 environment to Windows 2000/2003. I simply used ADSI Edit to add the @MY.DOMAIN to the end of current attribute setting, and all was well.

Unable to ssh into Cisco PIX or ASA

After a reboot of our Cisco PIX I was unable to login remotely using ssh. The first thing I tried doing was to remove the the pix entry from my ~/.ssh/known_hosts file. This did not work.

The only way I have found to gain access again is to regenerate the RSA key from the console:

MYPix (config)# ca zeroize rsa
MYPix (config)# ca generate rsa key 1024
MYPix (config)# ca save all

For a Cisco ASA:

MyASA (config)# crypto key generate rsa modulus 2048
MyASA (config)# write memory

Initiate Printer Creation From Command Line in Windows

To setup a network printer that is created and shared on SERVERNAME:


To set that printer as the default printer:


This can be useful to help somebody get a printer connected easily using a script.

More info:

Exchange 2010 – Trouble accessing the Exchange Control Panel (ecp)

While trying to access the Exchange Control Panel (https://exchangeserver/ecp), I kept getting the following error:

“Sorry! We’re having trouble processing your request right now. Please try again in a few minutes.”

Outlook Web Access (https://exchangeserver/owa) worked fine.

Thanks to jhoskins for the following post that provided the solution:

As mentioned in the post, I was also running Exchange 2010 on Windows 2012 server.

Since OWA was working, it just a matter of getting the ECP Application Pool in IIS to use the same version of .Net Framework. When the ECP was not working, the MSExchangeECPAppPool Application Pool was set to use version 4.0.30319. I simply changed it to version 2.0.50727 like the MSExchangeOWAAppPool was set, and it started working fine.

Exchange 2010 – Receive Connectors

To configure Exchange relay mail from something that is not another Exchange server, you will need to create an additional Receive Connector. The best approach is probably to create and named them based on authentication or Permission Groups. That way, if you need to add another later, it will easy to identity where you need to be and what you need to do. For example, you might name one “Anonymous No Auth” or “Anonymous TLS”.

To create a new Receive Connector, open the EMC (Exchange Management Console) and under “Server Configuration”, select “Hub Transport.” Select the Exchange server under in “Hub Transport” window in the top of the screen. This is show you all of your current Receive Connectors. In the Actions (right side of the screen), select “New Receive Connector …”

Name: Anoymous TLS
Select the intended use for this Receive connetor: Custom

Local Network settings:

Remote Network settings:
Select and hit the red X to remove it. Then, add the IP or IP Range for which you want the connector to apply.


Then, in the bottom window pane, you will the newly created Receive Connector. Right mouse click on it and go to Properties. Click on the “Authentication” tab. TLS should be selected by default. If you want no authentication for this connector (not recommended of course), you would uncheck TLS leaving nothing checked here.

On the “Permission Groups”, check “Anonymous users”.

In Exchange 2013, Receive Connectors are under “Mail Flow” in the ECP.

Android M on a Nexus 6 – General Nexus 6 Android Installation

OS: Mac OS Mavericks

If you want to flash your Android 5 device with a new system image, you will more than likely need to unlock the bootloader. This is done by enabling the OEM unlock.

You will need the developer’s SDK for the tools needed:

After you install the SDK, it will make things easier if you add the location of the tools needed to your PATH variable. Note: you will probably need to create the .bash_profile file. One does not exist by default in Mavericks.

$ cat ~/.bash_profile
export PATH=$PATH:/Users/username/Library/Android/sdk/platform-tools

Plug your phone in using the USB cable. Note: I have had some issues with different micro USB cables. I would use the one that came with phone if possible.

You can try the OEM unlock by issuing the following command. This did not work for me with a Nexus 6. Instead, I unlocked it from the Developer options.

$ fastboot oem unlock

Enabling Developer options:

Go to “Settings” and then “About Phone”, and tap the firmware version several times. You will get a countdown for the number of taps to get you into Developer mode. Go back to “Settings” and notice that you now have a “Developers options” option. Select it and turn on OEM unlocking. You might have enter your phone unlock PIN and then confirm to enable.

Turn off the phone. Hold down volume button on the volume rocker and power button at the same time. This will put your phone into transfer mode.

Download the Android M preview system image from:
Other available system images for when you want to switch back:

Uncompress the downloaded shamu-MPZ44Q-preview-c1d6506a.tgz file by double clicking it in Finder.

Using Terminal go to the location where you saved and uncompressed the download. The directory will be called shamu-MPZ44Q. In that directory, unzip

Install Android M:

fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash userdata userdata.img
fastboot reboot

Here is what the output should look like:

$ ./
target reported max download size of 536870912 bytes
sending ‘bootloader’ (3807 KB)…
OKAY [ 0.187s]
writing ‘bootloader’…
(bootloader) flashing partition …
(bootloader) This may take a few seconds if a
(bootloader) different partition table is being
(bootloader) flashed since we need to backup
(bootloader) and restore a few partitions
(bootloader) Flashing primary GPT image…
(bootloader) Flashing backup GPT image…
(bootloader) flashing aboot …
(bootloader) flashing sbl1 …
(bootloader) flashing rpm …
(bootloader) flashing tz …
(bootloader) flashing sdi …
(bootloader) flashing logo …
OKAY [ 0.358s]
finished. total time: 0.545s
rebooting into bootloader…
OKAY [ 0.001s]
finished. total time: 0.001s
target reported max download size of 536870912 bytes
sending ‘radio’ (67556 KB)…
OKAY [ 2.965s]
writing ‘radio’…
(bootloader) flashing modem …
(bootloader) flashing mdm1m9kefs1 …
(bootloader) flashing mdm1m9kefs2 …
(bootloader) flashing mdm1m9kefs3 …
(bootloader) flashing versions …
OKAY [ 0.739s]
finished. total time: 3.704s
rebooting into bootloader…
OKAY [ 0.001s]
finished. total time: 0.001s


$ fastboot flash recovery recovery.img
target reported max download size of 536870912 bytes
sending ‘recovery’ (8877 KB)…
OKAY [ 0.444s]
writing ‘recovery’…
OKAY [ 0.118s]
finished. total time: 0.562s


jimsmac:temp jgz$ fastboot flash boot boot.img
target reported max download size of 536870912 bytes
sending ‘boot’ (8161 KB)…
OKAY [ 0.406s]
writing ‘boot’…
OKAY [ 0.087s]
finished. total time: 0.493s


$ fastboot flash system system.img
target reported max download size of 536870912 bytes
sending sparse ‘system’ (517183 KB)…
OKAY [ 31.545s]
writing ‘system’…
OKAY [ 5.282s]
sending sparse ‘system’ (523718 KB)…
OKAY [ 32.352s]
writing ‘system’…
OKAY [ 5.009s]
sending sparse ‘system’ (522246 KB)…
OKAY [ 31.508s]
writing ‘system’…
OKAY [ 4.846s]
sending sparse ‘system’ (370015 KB)…
OKAY [ 23.730s]
writing ‘system’…
OKAY [ 3.407s]
finished. total time: 137.691s


$ fastboot flash cache cache.img
target reported max download size of 536870912 bytes
erasing ‘cache’…
OKAY [ 0.035s]
sending ‘cache’ (6248 KB)…
OKAY [ 0.329s]
writing ‘cache’…
OKAY [ 0.083s]
finished. total time: 0.447s


$ fastboot flash userdata userdata.img
target reported max download size of 536870912 bytes
erasing ‘userdata’…
OKAY [ 2.290s]
sending ‘userdata’ (138868 KB)…
OKAY [ 6.092s]
writing ‘userdata’…
OKAY [ 2.058s]
finished. total time: 10.440s


$ fastboot reboot

finished. total time: 0.022s

You can use the same procedure to downgrade your phone back to Lollipop using one of the downloads at

Return top