Finding a file based on contents

A quick tip (from my old notes) about how to find files on Unix/Linux, based on their contents

find . -exec grep thing '{}' \; -print

where thing is what you are looking for…

No Comments

Awesome Multifactor Authentication – and Free !

If you have any need for strong authentication for *nix systems, WordPress, Juniper/Cisco VPN devices, RADIUS servers then check out http://www.duosecurity.com/

Its simply awesome and free for up to 10 users !

I’m using it for a variety of projects……

No Comments

Quick Tip: 6500 Chassis Serial Number

Why oh why Cisco ?

Most devices the serial number can been seen on a show version or similar prompt.

c6500’s are different…….   use  show idprom backplane instead

No Comments

Orange + iphone4 + 3G = pile of shit

I have been a loyal (?) customer of Oranges for over 15 years but am at the end of my tether with their network

I have an iPhone 4 and yes I know it’s a crap phone but why is there 3g network so bad. I am working in a ‘new’ town so would expect decent coverage but no. 3G lies like a cheap watch and is slower than manually setting GPRS, calls continually drop even when the phones showing 3 bars. The place I’m working for even uses Orange as a supplier for 3G and I’m not sure how they put it with the shoddyness.

I have the same issue at home but made even worse by continually swapping between Orange/T Mobile. Supposedly the result of their ‘everything everywhere’ initiative that feels like ‘nothing nowhere’

Take my advice. Leave or avoid Orange at all costs!!!!!

1 Comment

Windows 7– Offline files and SMB shares

Why is it so difficult for this to work out of the box ?

I’m currently using a hacked WD MyWorld NAS device that runs BusyBox, Optware and the latest release of Samba.   You would think offline files would be easy to get working.

Wrong.  See http://blog.rainiernetworks.com/2008/06/25/vista-synchronization-errors/ and http://justanothersysadmin.wordpress.com/2008/03/30/vista-offline-files-and-smb-opportunistic-locks/

Why oh why Microsoft not make the offline files function out of the box.  I guess it works fine against a Microsoft server but in the spirit of greater interoperability fix it please !

No Comments

Awesome Engineering

Some folks amaze me with their skill.  Its a simple thing really but just works…..  have a look

http://www.johnbenson.net/How_to_Convert_a_SIM_to_a_MicroSIM_with_a_Meat_Cleaver/How_to_Convert_a_SIM_to_a_MicroSIM_with_a_Meat_Cleaver.html

More more – shall we say ingenious – have a look at one of my fave sites :)

http://thereifixedit.com/

No Comments

Cron

Useful CRON reference  guide available at:

No Comments

Cisco CUCM/Call Manager – Running on Sun’s Virtual Box

Well it is possible :) with a bit of hacking – but thats what its all about, isn’t it !

I actually used an existing working VM that had been built on VMware.  I will test building one from scratch on VirtualBox but not 100% sure it will work….

Anyhooo…

1) Get the existing VMDK and copy it to your Virtual Box machine repository
2) Create a new VM using a Linux, Redhat, 1024MB RAM etc machine and set the disk as the VMDK
3) Modify the machine – I removed the sound card
4) Locate the machines XML config file.   The directory is set in VirtualBox’es config.  Edit it and add the following:

Add the following lines to it in the "<ExtraData> </ExtraData>" section:

<ExtraDataItem name="VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVersion" value="6 "/>
<ExtraDataItem name="VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" value="VMware"/>
<ExtraDataItem name="VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor" value="Phoenix Technologies LTD"/>
<ExtraDataItem name="VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct" value="VMware Virtual Platform"/> 

(That bits from http://ubuntuforums.org/showthread.php?t=1029144)

5) Next follow the guide here http://www.blindhog.net/how-to-get-root-access-on-call-manager-56-server/ to get root access.  Make sure you use the CentOS Disk 1 rather than the Live Disk…….grrrrr

6) Edit the /usr/local/bin/base_scripts/hardware_check.sh script to look like this:

We essentially comment out the hardware check and validation :)

function check_deployment()
{
    local tmp_deployment
    initProductLibrary
    tmp_deployment="$deployment"
    # Check the deployment
#    isHardwareValidForDeployment $tmp_deployment
#    rc=$?
#   if [ $rc -ne 0 ]; then
#         log info "$tmp_deployment deployment Not Supported"
#         return 1
#    fi
    # Deployment is supported by this hardware
    log info "$tmp_deployment deployment Is Supported"
    return 0
}

 7) Save it and reboot

8) The VM should come up and work !

, , ,

1 Comment

Quickie: Setting Company Name for Mac OSX XCODE

Quick note to remember how to set company name in the OSX XCODE environment.  Taken from http://macdevelopertips.com/xcode/change-company-name-in-xcode.html/trackback

1) Open Terminal
2) Run >>>>   defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{ORGANIZATIONNAME="YourNameHere";}'
3) Done

,

No Comments

Sun Virtual Box – Cloning machines

I’m a big fan of Sun’s Virtual Box – its cross platform (I run it on Windows 7 X64,OS X and Ubuntu), FREE and works :)

Cloning machines is pretty the same as all OS’s, with one slight twist…..

1) Copy the VDI file you want to clone/backup.

2) This file won’t boot because it has the same UUID as the first file you copied, so need to use VBoxManage utility to give it a new random UUID.

3) Open command prompt, and change to your Vbox directory with VBoxMange.exe in it. Probably located at C:\Program Files\Sun\xVM VirtualBox\

4) Run this command in command prompt
VBoxManage internalcommands setvdiuuid “D:\My Virtual Machines\VDI\HardDiskName.vdi”

Obviously you would change the above path to point to your NEW VDI file that you created (not the original).

,

No Comments