Dec 032012

Being in love with wonderful VirtualBox since I’ve tried the first time few years ago, I noticed that the disk files are often incompatible with VMware.

Today I’ve found a good solution and I want to make sure I will not forget, hence writing on my… favourite notepad 🙂

The conversion trick can be done on a command line, using the utility VBoxManage with the clonehd parameter as follows:

VBoxManage clonehd "name_of_original_disk_file.vmdk" name_of_the_converted_disk_file.vmdk --format vmdk --variant standard

This will create in no time (13 GB converted in few seconds) a VMware compatible disk image which can be used as a starting point to recreate the VMware VM.

Example of the output is:

Clone hard disk created in format ‘vmdk’. UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx


Nov 292012

Can’t remember how much I dug this info on the internet, always when in emergency.

Hence I’ve decided once forever to write a small note here.

Suppose that in /boot directory there is a kernel you want to remove, identified by files like:

  • abi-2.6.38-15-generic-pae
  • config-2.6.38-15-generic-pae
  • initrd.img-2.6.38-15-generic-pae
  • vmcoreinfo-2.6.38-15-generic-pae
  • vmlinuz-2.6.38-15-generic-pae

Here’s the right command:

apt-get remove --purge linux-image-2.6.38-15-generic-pae

If you are brave and wanna go scripting wild 🙂 first you check what kernel are you booting with using the command:

uname -r

This will give you an output like: “2.6.38-16-generic-pae”

Then you check which other kernels you have, except the one you’re booting with, using the command:

dpkg -l|egrep '^ii  linux-(im|he)'|awk '{print $2}'|grep -v `uname -r`
(yes, if you do not use egrep on the first grep it won't work)

This will return the list of kernels which are not the one you’re executing (because you excluded that one with grep -v):


Finally, you run the remove command using:

sudo apt-get remove $(dpkg -l|egrep '^ii  linux-(im|he)'|awk '{print $2}'|grep -v `uname -r`)

TO BE CHECKED: the command above might remove also metapackages such as linux-headers-generic-pae. Hence it is safer to remove one by one the needed packages from the above list.

May 092012

As usual, almost every note in this blog starts from a need I’ve solved and want to share this info with the world.

This time it has been the need to change my Windows 2008 R2 domain name.

The machine is a Domain Controller in my lab, hence I was prepared to go through a painful long process with clumsy and difficult instructions.

Until I found a great hint about the main steps to get you to the point, quick and dirty but straight to a working condition.

Thanking this guy who put down this instructions, I invite you all to click on the link and solve your need in case it is similar to mine.

Feb 232012

Because all of my Mac systems were upgraded at home were upgraded from Snow Leopard to Mac OS X Lion, I did not noticed that Apple left out of Lion (when freshly installed like on my Mac Mini Server) iDVD and iWeb.

For iWeb not a very big deal since I can user the awesome Wiki3 bundled with the server, but iDVD was  something I used from time to time to create slideshows and movies to be played in standard DVD players (yes, Apple, there are still some around 😉 ).

With much surprise, I’ve discovered that iDVD can be “installed” on my Mini Server by proceeding as follows:

  • on your Mac where you still have an iDVD version, right click on the application and select “Compress iDVD”
  • on your Mac in folder /Library/Application Support/iDVD, compress the subfolder Themes using same technique
  • copy the two compressed files on your new Lion and unzip them by double clicking on the compressed files.
  • copy the iDVD package (the one with the blue icon resembling a DVD) in your Applications folder
  • create a folder named iDVD in /Library/Application Support/
  • copy the Themes directory in /Library/Application Support/iDVD folder
  • launch iDVD and enjoy
Feb 232012

…because I simply love this new authentication technique.

When you install the WordPress plugin, the login screen changes with a small button to perform the BrowserID enabled login:

When you click on Sign in, the verification begins…

et voilà, you’re in your Dashboard!

Of course you need to have a user with email matching the email you’ve registered with BrowserID.

Easy, rather secure, immediate!

Kudos to Mozilla Identity Team!

Jan 262012

As usual, not that immediate to find a proper answer on the ‘Net, hence I’m providing one here.

While in Snow Leopard was quite easy to see your ext2/ext3 formatted disks via MacFuse and ext2-fuse, in Lion you need to install another fuse fork and select a special option. That new fork is OSXFUSE, which latest release at the time of this post if from December 2011.

The most common symptom indicating you need this is to try mounting an ext2/3 formatted drive and see the following error:

fuse-ext2 /dev/disk3s1 /Volumes/Movies
dyld: Library not loaded: /usr/local/lib/libfuse.2.dylib
 Referenced from: /usr/local/bin/fuse-ext2
 Reason: image not found

During the installation of OSXFUSE, you need to enable MacFuse Compatibility Layer by flagging the appropriate checkbox as shown below:

click to zoom

Once you’re done with this, replug your ext2/3 formatted drive and it’ll automagically mount it in Finder, giving your deserved magnificent user experience of a Mac user 😉




Dec 192011

Took me BIG time, some hack and research on the internet to find the information contained in this post.

Don’t want to redo it again therefore I “took note” in my universally accessible internet notepad 😉

The problem is the following: when I installed OpenLDAP, I have set a password for my OpenLDAP administrator that I would like to change. Admin account is normally NOT stored in the main LDAP bridge where other accounts are stored, and it is particularly difficult to find good documentation about how to do it.

If you find yourself in the same situation, here a working procedure you can follow (which at least worked on my OpenLDAP running on Ubuntu 10.10).

Although you can type in the password straight in a certain file in cleartext if you have root access to the machine, the more “elegant” way is to use the proper ldapmodify command.

First, we need to find a way to locate the credentials information of the administrator account in the correct database within the LDAP tree.

This can be done using the command:

ldapsearch -LLL -Y EXTERNAL -H ldapi:/// -b  cn=config olcRootDN=cn=admin,dc=example,dc=com dn olcRootDN olcRootPW

(replace olcRootDN value highlighted in blue with the correct value to match your configuration)

This command will return:

SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
dn: olcDatabase={1}hdb,cn=config
olcRootDN: cn=admin,dc=example,dc=com
olcRootPW: {SHA}ksixAVfgRXavGCpkPefc6hRHL4X=

There are two interesting information we know now:

  1. we need to modify the entry “dn: olcDatabase={1}hdb,cn=config
  2. the current password is hashed with SHA1 algorythm.
    Therefore we need to generate our new password with the same algorythm using the command slappasswd using the syntax
slappasswd -h <the hashing scheme we want to use - for example {SHA}>

The system will then prompt us twice for the new password to use and will finally display the hashed value we’re interested in (example below with password = password)

root@testbox:~# slappasswd -h {SHA} New password:
Re-enter new password:

Then we’ll proceed to modify the entry we’ve identified above using the command:

root@testbox:~# ldapmodify -Y EXTERNAL -H ldapi:///

The system will start the listening mode for modifying commands:

SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth

First, we enter the entry we want to modify:

dn: olcDatabase={1}hdb,cn=config

Second, we type in the parameter we want to modify:

replace: olcRootPW

Third, we type in the new password generated above (copy and paste is MUCH less error prone than manual typing at this point 😉 )

olcRootPW: {SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=

Hit Enter another time to commit the modification and the following line will appear:

modifying entry "olcDatabase={1}hdb,cn=config"

After this, you can exit the listening mode with CTRL+C and restart the LDAP database service using

service slapd stop
service slapd start

and login now with the new password set.


Dec 152011

Had a need, found a solution, reporting the procedure here.

First, you need to understand what is the disk name of the device you want to format.

For example, if you have a MacBook Pro and a SD card, this is done using disk utility, selecting the card reader where you inserted the SD card and clicking on Info button to get information about the storage.

Click to enlarge the picture below.


Even with an italian screenshot, you can grab that in my example the device name is disk4.

Open Terminal and type the command reported below to proceed with the format:

diskutil partitionDisk /dev/disk4 MBRFormat “MS-DOS FAT32” “2G2Gb

This will create on /dev/disk4 a FAT 32 (MS-DOS FAT16 will do a 16bit one) partition labeled 2G of 2 Gb in size.


Dec 042011

How many times I did find myself launching a script, or worst, seeing a process running on a system and wishing to take control over it… the answer is too many 😉

Today I’ve found a nice solution at least for Linux systems with the utility reptyr.

While I’m writing this post the package is still in unstable dist, hence not part of the “standard” repositories for a Debian Linux system.

But you can download it using command:


for i386 architecture.

Then, to install

qpkg -i reptyr_0.3-2_i386.deb

And finally you run it.

For example, to bring a process with pid 4242 to your running tty you type:

reptyr 4242