The VMware homepage is a damn maze. Every time I reinstall an vSphere server I can never find the page to get the key I generated.
Anyway login to your vSphere account and click here: https://my.vmware.co … ree-esxi5&lp=default
Mutterings, inconsistant tips, rants and randomness
The VMware homepage is a damn maze. Every time I reinstall an vSphere server I can never find the page to get the key I generated.
Anyway login to your vSphere account and click here: https://my.vmware.co … ree-esxi5&lp=default
A great tool for all system administrators!
@echo off
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%system32cacls.exe" "%SYSTEMROOT%system32configsystem"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%getadmin.vbs"
"%temp%getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%getadmin.vbs" ( del "%temp%getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------
<YOUR BATCH SCRIPT HERE>
Save the whole thing as install.bat
Now with WinRAR (yes go and install it), Right click install.bat and select “Add to archive…”
Under Archiving Options select: Create SFX archive
Click on the Comment tab (across the top)
Enter the following:
Path=%tmp% SavePath Setup=%tmp%install.bat Silent=1 Overwrite=1
If you want to add a pretty icon etc, thats done under the Advanced tab.
Click OK and your Done!
Now your practically unstoppable, Admin Rights and an executable file - Your life just got so much easier!
Link back for the WinRAR exe
Regards to this guy for BatchGotAdmin!
Often with virtualised servers you can have a slow time generating entropy for virtualised systems and you get stuck with this message:
We need to generate a lot of random bytes. It is a good idea to perform some other action (type on the keyboard, move the mouse, utilize the disks) during the prime generation; this gives the random number generator a better chance to gain enough entropy.
The quickest way in my opinion is the following command. Just make sure you have a dvd / cdrom iso mounted and connected with vmware.
until [ 1 = 0 ]; do dd if=/dev/sr0 of=/tmp/dvd.iso; rm /tmp/dvd.iso -f; done
and ^C when your done!
I have finished setting up a new tool for in browser AES256 encryption via the javaScrypt library. Included within the page is a tool to produce SHA1 / SHA224 / SHA256 / SHA384 / SHA512 hashes.
The idea was that I has a central place to encrypt and decrypt data any time, any place with no reliance on anything except a web browser. I wanted to use java script so that both mine and your data doesn’t leave the browser and stays confidential.
(Perhaps David Petraeus could have used something like this, the trail might have been even harder to follow had he left the ‘draft’ message encrypted)
I implemented the SHA hashing as a tool to strengthen poor passphrases. The idea being that you use your lame password as input, create the hash and encrypt your data with the 128 character key (SHA512). When you need to decode your data you just do the reverse. Now some valid points to think about are:
Check it out here: http://www.cammckenzie.com/encrypt/
ssh into your vdi-in-a-box server as user kvm
# Make our temp working area
mkdir keystore cd keystore
# Run the following command which will create a new keystore, new keypair, a self signed cert that will last 10 years.
# Change HOSTNAME to your public DNS name. eg, remote.acme.com
keytool --genkey --dname "CN=HOSTNAME, OU=VDI-in-a-Box, O=YOUR-BUSINESS, L=YOUR-CITY, ST=YOUR-STATE, C=US" --alias HOSTNAME --keyalg RSA --keysize 2048 --validity 3650 --keystore kmgr.keystore
# cd into /home/kvm/kvm/install/servlet_container/conf
cd /home/kvm/kvm/install/servlet_container/conf
# Backup the old keystore
mv .keystore .Original-keystore
# Backup the server.xml file
cp server.xml server.Original.xml
# edit the server.xml file
# Find the clientAuth line by searching/typing:
# /clientAuth=
# Verify the keystorePass=”password” entry does not already exist in entire Define a SSL HTTP/1.1 Connector on port 8443 section. Add the following line, # replacing “password” with your keystore password:
EG.
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true" ciphers="SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA" keystoreFile="conf/.keystore" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" URIEncoding="UTF-8"/>
Would look like:
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true" ciphers="SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA" keystoreFile="conf/.keystore" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" URIEncoding="UTF-8" keystorePass="YOUR-KEYSTORE-PASSWORD"/>
# restart Tomcat
tc_start
Check your new self signed cert is shown in the browser!