How to bypass domain password policy for local user on Windows

I had to create a new local user on a domain member server with a password too simple for complexity requirement (complexity is enabled on active directory domain via GPO).
A temporary solution (until next GPO refresh) is this:

secedit /export /cfg C:\new.cfg

Edit new.cfg and change line “PasswordComplexity = 1″ to “PasswordComplexity = 0″

secedit /configure /db %windir%\security\new.sdb /cfg C:\new.cfg /areas SECURITYPOLICY

You are now able to set a password that do not fulfill complexity requirement.

Via: http://serverfault.com/questions/134094/windows-web-server-2008-r2-server-core-local-password-complexity

Posted in Computers and Internet | Tagged , | Leave a comment

File Explorer and IPv6 address on Windows

SMB do not support colons “:” and square brackets “[]” on path.

As workaround you can use dashes “-” and Ipv6-literal.net names:

\\[IPv6 address with dashes instead of colons].ipv6-literal.net\[share]

\\2001-db8–10.ipv6-literal.net\share

Via:
http://msdn.microsoft.com/en-us/library/aa385353.aspx

Posted in Computers and Internet | Tagged , , | Leave a comment

How to copy VMs from one ESXi to another in free license

Using OVFTool from VMWARE you are able to copy VMs from one ESXi to another without vCenter. This script is used on our test environment to make a sort of disaster recovery.

It’s a bash shell script (I used a Linux machine as management host) but I think is not a big work to translate it in  powershell and run it on a windows machine.
The script need SSH service running on ESXi host because on “license free” is not possible to remotely manage ESXi hosts. Is also necessary to have installed “sshpass”

Main script (schedule this script on Linux machine):

#!/bin/bash
path_sshpass="/userhome/media/DISK_A63AB3C0-8E73/bin/"
path_ovf="/userhome/media/DISK_A63AB3C0-8E73/bin/ovf/"
path_script="/userhome/media/DISK_A63AB3C0-8E73/script/"

ESX_Server_Source="2001:DB8::10"
ESX_User_Source="your user"
ESX_Password_Source="your password"
ESX_Server_Target="2001:DB8::11"
ESX_User_Target="your user"
ESX_Password_Target="your password"
VMList="VM01TEST VM02TEST VM03TEST"

LOG="/userhome/media/DISK_A63AB3C0-8E73/script/esx_replica.log"

echo "$(date '+%Y-%m-%d %H:%M') # Starting Job" |tee $LOG

for VMNAME in $VMList
do
        echo "$(date '+%Y-%m-%d %H:%M') # Cloning $VMNAME ###################" |tee -a $LOG

        ESX_ssh=$ESX_User_Source"@"$ESX_Server_Source
        ovf_Source="vi://"$ESX_User_Source":"$ESX_Password_Source"@["$ESX_Server_Source"]/"$VMNAME
        ovf_Target="vi://"$ESX_User_Target":"$ESX_Password_Target"@["$ESX_Server_Target"]"
        sed_cmd="s/Patata/"${VMNAME}"/g"

        echo "$(date '+%Y-%m-%d %H:%M') # Running esx_vmStop" |tee -a $LOG
        STATE=$(sed ${sed_cmd} ${path_script}esx_vmStop.sh | ${path_sshpass}sshpass -p ${ESX_Password_Source} ssh ${ESX_ssh})
        echo "# VM state: $STATE"

        if [ "$STATE" = "Powered off" ]; then
                echo "$(date '+%Y-%m-%d %H:%M') # Running OVF..." |tee -a $LOG
                ${path_ovf}ovftool --noImageFiles --overwrite --powerOffTarget -ds="datastore1" ${ovf_Source} ${ovf_Target}
                OVF_Error=$?
                echo "$(date '+%Y-%m-%d %H:%M') # OVF exit: $OVF_Error" |tee -a $LOG

                echo "$(date '+%Y-%m-%d %H:%M') # Running esx_vmStart" |tee -a $LOG
                sed ${sed_cmd} ${path_script}esx_vmStart.sh | ${path_sshpass}sshpass -p ${ESX_Password_Source} ssh ${ESX_ssh}
        fi
done

esx_vmStop.sh script (script used by the main script under ssh for shutdown VMs):

#!/bin/ash
INTERVAL=60
VMNAME="Patata"

VMs=$(vim-cmd vmsvc/getallvms | grep -w ${VMNAME} | awk '{print $1}')
if [ -z "$VMs" ]; then
        echo "VM not found"
        exit
fi

STATE=$(vim-cmd vmsvc/power.getstate ${VMs} | grep -v "runtime")

if [ "$STATE" = "Powered off" ]; then
        echo $STATE
else
        vim-cmd vmsvc/power.shutdown $VMs
        sleep $INTERVAL
        STATE=$(vim-cmd vmsvc/power.getstate ${VMs} | grep -v "runtime")
        echo $STATE
fi

esx_vmStart.sh script (script used by the main script under ssh for start VMs):

#!/bin/ash
INTERVAL=60
VMNAME="Patata"

VMs=$(vim-cmd vmsvc/getallvms | grep -w ${VMNAME} | awk '{print $1}')
if [ -z "$VMs" ]; then
        echo "VM not found"
        exit
fi

STATE=$(vim-cmd vmsvc/power.getstate ${VMs} | grep -v "runtime")

if [ "$STATE" = "Powered off" ]; then
        vim-cmd vmsvc/power.on $VMs
else
        echo $STATE
fi

Copy this 3 script on management machine where is installed ovftool. Change variables according to your environment:
path_sshpass : path where is located sshpass
path_ovf :path where is located ovftool
ESX_Server_Source : IPv6 ipaddress of source ESXi Host
ESX_User_Source :user to use on ssh connection against source ESXi host
ESX_Password_Source :password of ESX_User_Source user
ESX_Server_Target : IPv6 ipaddress of target ESXi Host
ESX_User_Target :user to use on ssh connection against target ESXi host
ESX_Password_Target :password of ESX_User_Target user
VMList : list of VMs to copy from source ESXi to target ESXi (VM name separated with a space)
LOG : path where save the log

Notes:
If you are using ipv4, remove square bracket “[]” from the main script.
On windows, you can use “plink” instead of sshpass, or use public/private keys

I used a IGEL thin client (Linux-based) as “management machine”. Just copy from an UBUNTU 13.04 x32 machine the folder /usr/lib/VMware-ovftool/ and the /usr/bin/sshpass to IGEL machine (I put these stuffs and the script on a mounted usb key). It’s slow but it’s work!

Via:
http://www.virtuallyghetto.com/2012/06/how-to-copy-vms-directly-between-esxi.html
http://www.pjb.cc/?p=219

Posted in Computers and Internet | Tagged , , , | Leave a comment

How to set fixed IPV6 address in IGEL LX thin client

The only solution I found without using Universal Management Suite server is to using ifconfig inside network commands.

Run SETUP/SYSTEM
Select “Firmware Customizations/Custom Commands/Network Commands”
Add this command:

ifconfig eth0 inet6 add <ipv6address>/<prefixlength>

Posted in Computers and Internet | Tagged , | Leave a comment

How to schedule a job on IGEL LX thin client

You are able to schedule jobs on IGEL Linux based thin client without Universal Management Suite server.

start SETUP and go to SYSTEM/REGISTRY
Browse to “system/cron” set “enable_cron” to enabled
Select cronjob% and click on “ADD INSTANCE” button
Expand the newly created instance (es. cronjob0) and enter the command you want to execute and set the execution time.

IGEL cron
Asterix (*) in any category mean every time. Use commas (,) to specify multiple values.

Via: http://blog.cloud-client.info/2012/10/03/tip-running-a-scheduled-job-on-an-igel-universal-desktop-lx-os-without-a-management-server/

Posted in Computers and Internet | Tagged , | Leave a comment

How to run Ubuntu under Hyper-V

Probably your Ubuntu version already have Linux Integration Services built-in, but check the notes here because some more tasks are required : http://technet.microsoft.com/en-us/library/dn531029.aspx

Posted in Computers and Internet | Tagged , | Leave a comment

How to disable guest session and/or remote logon in Ubuntu 13.10

Here you find a nice post how to deal with LightDM guest session and remote logon session on Ubuntu.

http://www.snekul.com/wordpress/blog/2013/05/24/disable-guest-session-andor-remote-login-on-ubuntu-13-04-raring-ringtail/

Posted in Computers and Internet | Tagged , , | Leave a comment