I observed that in Ubuntu 12.04 by default bash history not enabled that is, history not stored in .bash_history file.
When I am looking at .bash_history file permissions its owned by root user and root group.
Due to this history is not stored in .bash_history.
To resolve this issue I changed owner and group of the .bash_history file (in our case its guest user and guest group) with following command:
$ chown guest:guest .bash_history
After updating owner and group history is getting stored in .bash_history file.