Search blog

Tuesday, March 31, 2015

[[SOLVED]] - Accidentally Deleted Snapshot in VirtualBox and OS not Booting in Ubuntu 14.04

If you happen to accidentally delete your 'Snapshot' files and have been getting an error as - 'vd: error verr_file_not_found opening image file;' read further for the solution:


If your VM is in the 'saved state' first you will have to the discard the saved state to make any changes. To do so in your VirtualBox Manager go to Machine and then select 'Discard saved states' or press 'CTRL+J.' As the prompt indicates this will be equivalent to switching off your system and now you can make the required changes.

Now go to File menu and select 'Virtual Media Manager' or press 'CTRL+D.' Release the snapshot displayed with a red mark and also Delete it.


Now you will have to select the original 'vdi file' that was created during your installation process. To do this Select Modify and go to the location where you have installed your VirtualBox and select the 'vdi file'  and Restart.


Your problem should be RESOLVED now.

Enabling USB WiFi Network Adapter in VirtualBox with Kali Linux as Guest OS


I found enabling USB WiFi Adapter in Window 7 much simpler than Linux, precisely Kali Linux. Not that I couldn't do it in Kali but after sometime the connection would drop. But with Windows 7 it didn't take me a fraction of time compared to Kali and with the method I discovered the connection is also not dropping in Kali now.

So here's how to do it with Kali Linux as Guest OS. You can also use the same technique while using other OS such as Windows as Guest OS:

1. First make sure you have  added yourself to the user group 'vboxusers'; else you will be unable to view your Wireless USB Network Adapter under the  USB Devices list.

2. Now you can select your Network Adapter by going to --> Devices -->  USB Devices --> Select your Network Adapter here

Now to save yourself from your 'connection getting dropped' every now and then, make sure you have disabled your Internet connection from your Host OS. See the image below.


To confirm your WLAN setup Open your terminal and type:


 ifconfig  

You should be seeing something like wlan0 along with the details as in the image above.

Monday, March 30, 2015

PDOException: SQLSTATE[42S22]: - ERROR

I got the error below while trying to migrate data from my remote host to local host in a multisite setup.

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column
 'base.owner' in 'field list' : SELECT base.id AS id, base.name AS name, 
base.label AS label, base.plugin AS plugin, base.active AS active, 
base.weight AS weight, base.status AS status, base.dirty AS dirty, 
base.module AS module, base.owner AS owner, base.access_exposed AS 
access_exposed, base.data AS data FROM {rules_config} base WHERE 
(base.plugin = :db_condition_placeholder_0) AND 
(base.active = :db_condition_placeholder_1) ; Array 
( [:db_condition_placeholder_0] => reaction rule 
[:db_condition_placeholder_1] => 1 ) in EntityAPIController->query() 
(line 187 of ntity\includes\entity.controller.inc).

The simplest way I could resolve this is using Drush to access update.php and update the contributed modules. Once I updated my site the problem resolved. Use the command below in your Drush CLI:

 drush updb  

Friday, March 20, 2015

Enable SSL in Unbuntu 14.04 in Localhost/VirtualHost

Follow the steps below to enable SSL in your Localhost and VirtualHost:

1. IF NOT USING VirtualHost:

Open the file 'default-ssl.conf' and you might see something like below. You will have to make changes to the lines in BOLD.
 <IfModule mod_ssl.c>  
   <VirtualHost _default_:443>  
     ServerAdmin webmaster@localhost  
     DocumentRoot /var/www/html    
     
     ErrorLog ${APACHE_LOG_DIR}/error.log  
     CustomLog ${APACHE_LOG_DIR}/access.log combined  
     SSLEngine on  
     SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem  
     SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key  
     <FilesMatch "\.(cgi|shtml|phtml|php)$">  
             SSLOptions +StdEnvVars  
     </FilesMatch>  
     <Directory /usr/lib/cgi-bin>  
             SSLOptions +StdEnvVars  
     </Directory>  
     BrowserMatch "MSIE [2-6]" \  
             nokeepalive ssl-unclean-shutdown \  
             downgrade-1.0 force-response-1.0  
     BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown  
   </VirtualHost>  
 </IfModule>  
Also you will have to add the following line just below the line 'DcoumentRoot /var/www/html':
 <Directory /var/www/html>  
   Options All  
   AllowOverride All  
   Require all granted   
 </Directory>  
Enable SSL:
 sudo a2ensite default-ssl.conf  
Then finally restart Apache and you should be done:
 sudo service apache2 restart  
2. IF USING VirtualHost:

Make a COPY of the file 'default-ssl.conf' and rename the copied file as 'your-site-name.ssl.conf' and make the following changes:
 <IfModule mod_ssl.c>  
   <VirtualHost _default_:443>  
     ServerAdmin webmaster@localhost 
     ServerName your-site.local
     ServerAlias www.you-site.local 
     DocumentRoot /var/www/html/path-to-your-site    
     
     ErrorLog ${APACHE_LOG_DIR}/error.log  
     CustomLog ${APACHE_LOG_DIR}/access.log combined  
     SSLEngine on  
     SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem  
     SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key  
     <FilesMatch "\.(cgi|shtml|phtml|php)$">  
             SSLOptions +StdEnvVars  
     </FilesMatch>  
     <Directory /usr/lib/cgi-bin>  
             SSLOptions +StdEnvVars  
     </Directory>  
     BrowserMatch "MSIE [2-6]" \  
             nokeepalive ssl-unclean-shutdown \  
             downgrade-1.0 force-response-1.0  
     BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown  
   </VirtualHost>  
 </IfModule>  
Once again add the following lines just below the line 'DcoumentRoot /var/www/html':
 <Directory /var/www/html>  
   Options All  
   AllowOverride All  
   Require all granted   
 </Directory>  
Enable SSL:
 sudo a2ensite your-sitename.local-ssl.conf  
Then finally restart Apache and you should be done:
 sudo service apache2 restart  

Using Drush to Install Drupal 7 from Scratch


 Using Drush you can really simplify the process of installing a brand new Drupal site using a couple of commands in your CLI/Terminal.

Follow the instructions below to get started.

1. Firstly, create a Database for your New Drupal Installation and note the login credentials.

2. Open your terminal and change directory 'CD" to your Web Directory and enter the commands below:

The Web Directory/Document Root will depend on the OS you are using:
Linux/Ubuntu:

Linux: var/www/html/
Windows (XAMPP/WAMPP): C:\xampp\htdocs or C:\wamp\htdocs
7.x: here 'x' is the version number. Right now it's 7.35 so i enter drupal-7.35.

 drush dl drupal-7.x  

 Now in your terminal change directory to: cd drupal-7.x and enter the commands below:

 drush site-install standard --account-name=admin --account-pass=admin --db-url=mysql://root:YourPassword@localhost/test_dronaas  

  • Note: The Drupal username and password seem to always end up as admin/admin no matter what I set them to. So, I suggest just using those and then changing them after you login to your new site.
  • Also if you are using Linux/Ubutnu make sure to assign the apache-user to the directory 'files' located at 'sites/default/files.' You can do that using the command below:

 sudo chown www-data   

Monday, March 16, 2015

Cracking RAR, ZIP & 7z Passwords using RARCRACK and Ubuntu

Below are the steps by which you can try cracking your Zip, RAR & 7z passwords.

1. Firstly download the rarcrack program: Download.
2. Then COPY it to your Desktop.

3. Building and installing:


 $ tar -xjf rarcrack-VERSION.tar.bz2  
 $ cd rarcrack-VERSION  - eg cd rarcrack-0.2
 // you need gcc or any C compiler (edit Makefile CC=YOUR_C_COMPILER)  
 $ make  
 // you must be root in next step:  
 $ make install  

If you get an error like 'xml2-config: not found'; you can resolve this issue by:
Installing 'package libxml2-dev' for example:

On Linux/Ubuntu:
sudo apt-get install libxml2-dev

On CentOS/RHEL:
sudo yum install libxml2-devel

4. Once you have compiled RARCRACK you can execute it to crack your relevant file. Firstly come out of the rarcrack directory that you just extracted and compiled and type the following command in your terminal:
 rarcrack --type rar filename.rar  
asdasddsa

For more reference you may visit the RARCRACK site:  http://rarcrack.sourceforge.net/

or check the video below:



Monday, March 9, 2015

How to Update Oracle VM VirtualBox in Ubuntu 14.04

Updating to the latest version of VirtualBox:

  1. Download the latest version of VirtualBox at: https://www.virtualbox.org/wiki/Downloads.
  2. Right Click on the Downloaded Package and Select 'Open With > Ubuntu Software Center.'
  3. Now VirtualBox should be Updated.

Once you Update VirtualBox and Open it you will get a prompt to Update your Guest Additions as well. Simply follow the instructions in the simultaneous dialog box that prompts in your screen and Update the Guest Additions as well.

Top 5 Posts (Weekly)