VMware Workstation 10&gtk2 Errors on RHEL

When executing the vmware workstation bundle, the following gtk2 errors are displayed:

# ./VMware-Workstation-Full-10.0.4-2249910.x86_64.bundle 
Extracting VMware Installer...done.
Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: No such file or directory
Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory

Fix:

# echo "/usr/lib64/gtk-2.0/modules" > /etc/ld.so.conf.d/gtk2.conf
# ldconfig

Updating Database Connection Strings in XenDesktop 7.x

The scripts need powershell v3 at the moment (I may turn part of it into a module, and might be able to switch to powershell v2, but v3 is needed to load the core script into the other scripts.)

The scripts have been tested on Server 2012 R2, with XenDesktop 7.5 and XenDesktop 7.6. Note that this was as a full site admin and in local admin powershell window.

The provided scripts are:
DBConnectionStringFuncs.ps1 – this is the core script, and does the actual work. It contains common functions which the following scripts then use.
Change_XD_Failover_Partner_v1.ps1 – this is similar to the previous script I posted, and is used to update the failover partner.
Change_XD_To_ConnectionString.ps1 – this takes passed in connection strings and uses them, so a very generic version.
Change_XD_To_MultiSubnetFailover.ps1 – this toggles the addition and removal of MultiSubnetFailover=true. IE run it once and the option is added, run it again and the options is removed.
Change_XD_To_Null.ps1 – this is a reset of all the connection strings on the localhost as something has gone wrong. Note because this resets the connection strings to null, it will actually place the ddc into a “initial” state. IE if you run studio it’ll ask if you want to create a site, or join to another ddc. This is useful is something has gone wrong somewhere, and a reset is needed, as you can then attempt to set the connection strings again.

If you need to do some kind of connection string manipulation feel free to look at how the Change_XD scripts use the functions in DBConnectionStringFuncs.ps1.
XDConnectionStringScripts

Reset win2k8/2k12 domain admin password

My friend forgot his test lab domain admin password. And he only have a normal user account. So he asked me how can he reset his domain admin password.
It’s easy. Only a few steps

1. Boot the domain controller with a windows 2k8/2k12 installation CD
2. Press shift+f10 to start command line on the fist screen.
3. Run below command:

MOVE E:WindowsSystem32Utilman.exe e:WindowsSystem32Utilman.exe.bak
COPY E:WindowsSystem32cmd.exe e:WindowsSystem32Utilman.exe

You should replace E: with you local disk letter.
4. Restart the DC
5. When DC done booting up again and you are at the Logon screen click on the Ease of access icon. Then you should be able to open a command line.
6. Reset domain admin password

net user administrator *

Done

gentoo fix bash vulnerability (bash shellshock) CVE-2014-7169

All Bash 3.1 users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-shells/bash-3.1_p18-r1"

All Bash 3.2 users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-shells/bash-3.2_p52-r1"

All Bash 4.0 users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-shells/bash-4.0_p39-r1"

All Bash 4.1 users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-shells/bash-4.1_p12-r1"

All Bash 4.2 users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-shells/bash-4.2_p48-r1" 

Install PFX certificate on ESXi host

1. Install OpenSSL version 0.9.8 for windows, you can get it from below link:
http://slproweb.com/download/Win32OpenSSL_Light-0_9_8zb.exe
2. Install it on a windows machine. By default, OpenSSL will be installed to C:OpenSSL
3. Copy the pfx certificates into folder C:OpenSSLbin
4. Run command line as administrator, and go to folder C:OpenSSLBin
5. Use below command to covert the certificate:
a. Generate crypt key file for the certificate via below command:

openssl pkcs12 -in server.pfx -nocerts -out server_tmp.key 

During this step, it will ask for pfx certificate password and the pass phrase for the key. Use any word you like as the pass phrase, do not use blank pass phrase.
Then use below command to decrypt the key. In this step it will ask you the pass phase you used before.

openssl rsa -in server_tmp.key  -out server.key

b. Generate crt file for the certificate via below command:

openssl pkcs12 -in server.infau.wbcau.westpac.com.au.pfx -clcerts -nokeys -out server.crt 

6. Done. Now you can install the certificate for ESXi host