Archive

Archive for the ‘Uncategorized’ Category

How to increase the disk size of a ubuntu vdi on Mac

I have spent an hour to figure out how to increase the disk size of my ubuntu virtual machine running on Mac OSX, and decided to write this  🙂

Special thanks to http://tips.kaali.co.uk/2012/03/16/expand-or-increase-the-size-of-virtual-box-vdi-dis/ for the tutorial,  and the steps are: (please refer to that website for some screenshots).

  1. Create a new virtual disk
  2. Clone the old disk to this newly created virtual disk
  3. Disconnect the old disk via storage settings in Virtual Box
  4. Connect/Attach the new disk to the Virtual Machine
  5. Boot up using the new disk
  6. Finally, boot using a Ubuntu live cd, and use gparted tool to extend your volume. Use the following steps for extending the volume in Ubuntu VDI. (Here is a video tutorial: http://www.youtube.com/watch?v=cDgUwWkvuIY)
    1. Open Gparted. You should be able to see the unallocated space.
    2. Right click on swap (/dev/sda5) and select swap off.
    3. Click on the extended volume (/dev/sda2), and select resize/move  to increase the partition to cover all the unallocated spaces.
    4. then select swap, and move it to the right based on.
    5. After that, resize/move the extended volume to shrink to the previous size (to cover swap).
    6. Now, for the final step, select /dev/sda1, and use select/resize to allocate the unallocated space. You will get some warnings regarding data loss, however if you follow all the steps carefully, then you will not lose any data. But, it is important to take backup of your data.

Thanks for reading.

Advertisements

Upgrading JavaHL on Ubuntu

October 31, 2012 1 comment

Subclipse Eclipse plugin requires JAVAHL 1.7 or later. You may have encountered this error : Incompatible JavaHL library loaded.  1.7.x or later required, and now want to install the upgraded version. Luckily, there is ppa, created by Dominic Stadler that you can add in your repositories. Add sudo if you are not logged in as root.

now, delete your previously installed livsvn –

apt-get purge libsvn-java

Use the following command to add this in the repository:

add-apt-repository ppa:dominik-stadler/subversion-1.7

After that, update your repository and install

apt-get update

apt-get install libsvn-java

Cheers :). You may also need to add following line in your eclipse.ini after -vmargs line. Normally, it should be in /usr/lib/jni location, but if it’s not then you can use find / -name libsvnjavahl-1.so to find the exact location.

-Djava.library.path=/usr/lib/jni 

How to use a guest OS installed on Windows 7 – VirtualBox to another VirtualBox – Ubuntu

If you bumped into this post somehow, that means you really really want to use a guest operating system installed on your host operating system (i.e. Windows 7) using VirtualBox to another installed VirtualBox on different host operating system (i.e Ubuntu).

The process involves the following steps:

  1. Run VirtualBox in windows 7
  2. Select File Menu, and click Export Appliances
  3. Choose your desired guest operating system that you want to use.
  4. click next to create a ovf  (Open Virtualization Format) of your guest os.
  5. Now, copy your guestos.ovf file to Ubuntu and run VirtualBox.
  6. Select File Menu, and click Import Appliances
  7. Select guestos.ovf file and click next.
  8. Boom ! You got it !

Cheers !

Install VirtualBox in Ubuntu 12.04

September 10, 2012 1 comment

Installing VirtualBox in Ubuntu 12.04 is very easy, and what you need to do is to run the following commands in your terminal.

Open your terminal, login as  root, and run the command below to update your system:

apt-get update

After that, run the following commands to add VirtualBox repository’s key and VirtualBox repository in Ubuntu:

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add –
sh -c ‘echo “deb http://download.virtualbox.org/virtualbox/debian precise contrib” >> /etc/apt/sources.list’

Now, you are ready to install VirtualBox in your system using the following command:

apt-get install virtualbox-4.1

Enjoy your installed VirtualBox to load and run Guest Operating System  in it’s own virtual environment.

How to reset root/single_user password in Ubuntu on a Virtual Machine

November 10, 2011 3 comments

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.
5. Now, change with # passwd [username] (You can also see the list of users using # nano /etc/passwd).

Categories: Uncategorized

Configuring windows xp client for 802.1x authentication support for EAP-MD5

November 4, 2009 1 comment
In order to use windows X client of windows XP to test the 802.1x port based authentication:   go to network connection and right click on local area connection and select properties.
selection_802
Select the Authentication tab:
auth-tab
And then enable “802.1X authentication for the network” and select the eap method that you want to use. In my case, I have used  “MD5 challenge” but you can select according to your requirements. And then select “authenticate as computer when computer information is available”. And then select OK to apply the rules.
conf-aut-802

Free Radius Configuration with EAP-MD5 Authentication and MySQL for Accounting and Authorization : in Ubuntu

October 18, 2009 3 comments

Freeradius is most widely used radius server in the world. Freeradius server is fast, rich-feature, modular and scalable. It supplies the AAA ( Authentication, Authorization and Accounting) needs. I have configured freeradius with MYSQL for the part of my project work. Here, I am sharing the information, how you can configure easily freeradius with EAP-MD5 support and I have used HP2524 switch as my authenticator.

Installation:

To install freeradius and freeradius with mysql, use the following command:

 # apt-get install freeradius
 # apt-get install freeradius-mysql

Configuration:

In oder to configure freeradius for EAP-MD5 , in the /etc/freeradius/radiusd.conf file the authorized section must have eap :

authorize {
   preprocess
   files
   eap
}

In the authenticate section must have eap uncommented:

authenticate {
 eap
}

Finally, the EAP module under /etc/eap.conf has to be configured this way to support eap-md5:


eap {
   md5 {
   }
}

In order to use SQL for accounting purpose /etc/freeradius/radiusd.conf must have

$INCLUDE  ${confdir}/sql.conf

and sql.conf file must have the database name, server info and login credentials:
sql {
	# Database type
	# Current supported are: rlm_sql_mysql, rlm_sql_postgresql,
	# rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds
	driver = "rlm_sql_mysql"

	# Connect info
	server = "localhost"
	login = "root"
	password = ""

	# Database table configuration
	radius_db = "radius"

In the authorize section, uncomment the sql :

authorise {
       preprocess
       chap
       mschap
       suffix
       eap

       files
       sql
       pap
}

Add the line 'sql' to the accounting{} section to tell FreeRADIUS to store accounting records in SQL :

accounting {
       detail
       sql
}

add ‘sql’ to the post-auth{} section if you want to log all Authentication attempts to SQL.

post-auth {
 #  Get an address from the IP Pool.
#	main_pool
#	sqlippool

 #
 #  If you want to have a log of authentication replies,
 #  un-comment the following line, and the 'detail reply_log'
 #  section, above.
#	reply_log

 #
 #  After authenticating the user, do another SQL query.
 #
 #  See "Authentication Logging Queries" in sql.conf
 sql

}

In order to use switch as Authenticator in the port based authentication the clients.conf file must have the switch Information and shared secret:

#
# clients.conf - client configuration directives
#
#######################################################################

#######################################################################
#
#  Definition of a RADIUS client (usually a NAS).
client 192.168.30.5 {
	secret		        = radius123
	shortname		= hp
	nas-type		= other
}