Reading Java property file in Python

Accessing  a java property file in a python code is an easy task. For this we need to install, a python module called pyjavaproperties. (There are many other ways in which we can do this. I prefer this module)

For installing this, please run the following command :

sudo pip install

How to use it 

we have a property file named and which is as follows,
Now open a python ide and add the following lines
from pyjavaproperties import Properties
p = Properties()
p.list()     #will all the properties and its valuesprint                                               print p['user']   #prints Cruchify
Ref :                                                                                                                                          

How to Change Root password in Ubuntu Virtual Machine

In order to access the grub menu on a virtual machine, you need to hold the shift key down for a while. You must let your virtual machine to capture your mouse before holding the shift key. Follow the steps to change your password:

1. Let your virtual Machine to capture your mouse.
2. Hold the shift key down to get the grub menu.
3. Select the recovery mode option.
4. Select drop to root shell prompt.

After immediately selecting ‘Drop into root shell prompt’ I found the filesystem was mounted read only, which prevents resetting the password and got some error like

passwd: Authentication token manipulation error
  passwd: password unchanged

To fix this I had to run following command

  mount -rw -o remount /

Now you can change the root password using the command  :

passwd root

This would ask for new password and on entering it it would succefully chage the same too.

reference :

apt-get update Errors -5 – No address associated with hostname

When I tried to run sudo apt-get update, I came across something like this.

Ign precise InRelease
Err precise-cm5.5.1/contrib amd64 Packages
Couldn’t resolve host ‘’
Err precise-cm5/contrib Sources
Something wicked happened resolving ‘’ (-5 – No address associated with hostname).                    Ign precise-updates InRelease
Err precise-cm5/contrib amd64 Packages
Something wicked happened resolving ‘’ (-5 – No address associated with hostname)
Ign precise-backports InRelease
Err precise-cm5/contrib Translation-en_IN
Something wicked happened resolving ‘’ (-5 – No address associated with hostname)


This was a bit scary for me as it was for the first time I was facing something like this. And I even tried adding hostname of ubuntu server and  its ip address directly in my /etc/hosts file. and further to my frustration it did not work.  But The actual fix that worked for me is as follows:


echo “nameserver” | sudo tee /etc/resolv.conf > /dev/null                                                                                        sudo apt-get update

Then apt-get update worked perfectly.