Linux – Fixing Error sudo: /usr/bin/sudo must be owned by uid.

Linux – Fixing Error sudo: /usr/bin/sudo must be owned by uid.Here is another interesting thing I came through very recently.  If you have ever used a unix based operating system like Ubuntu, I bet you have had run into problems which happens suddenly, and you have no idea what caused it :)

This is the error I got,

sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

Now I’m going to tell you how I got the above error and how I fixed it.

I searched in many forums about this, and I found that there are two reasons for getting this error.

01.     Directory “/usr/bin/sudo“  is not having permission 755.     This happens if you run a command like “sudo chmod –R 777 /usr/” - which will set the permission to 777 for all the directories recursively.

02.    Directory “/usr/bin/sudo“  is not owned by the root user. (In case if you have run a command to change the owner.)

My issue was due to reason 01, and I solved it by following the below steps.

First restart your pc, and press the SHIFT key while Ubuntu is booting.

This will bring you up the boot menu.

Select Advanced Options.

Select your OS version in (recovery mode), and press Enter Key.

Ex : Ubuntu 14.04 (recovery mode)

It will bring you up another  screen. Now select “Drop to root shell prompt” and press Enter.

It will load a command line at the bottom of the screen.

Now run each of the following commands.

mount -o remount,rw /

mount --all

chown root:root /usr/bin/sudo

chmod 4755 /usr/bin/sudo


Now your pc will restart. Once you log in, you will find that you can use the sudo command again :)

Please leave a comment if this worked for you.

How to remove Vuescan watermark – Vuescan 9.4 Crack Version

remove vuescan watermarkFew months back I wrote an article about Vuescan Professional software, and one of my experiences about it. After publishing the article, I noticed that many people visited my blog looking for that software, and the problem they had is about the watermark which is embedded into the final image.

So here is the working solution for all my readers :) I’m going to tell you how to remove the Watermark from the final image and use the Vuescan Latest version without any restrictions.

The first thing you should understand is that if you are getting a watermark in scanned images, that means you are not using  a licensed version of vuescan. So in order to get rid of the watermark, either you will have to buy it, or use a cracked version of vuescan. Since you are worrying too much about the watermark, I know you are not going to buy it. So let’s continue with the second method, using cracked version. (But please note that I am not recommending you to use cracked software, I am doing this only for educational purpose and I always encourage you to buy it from the original developers, they deserve it).

Here is the link to the Vuescan 9.4 Cracked version I used to test this.

Download Vuescan 9.4 Cracked version

Once you download the above zip file, extract it and install the version which is compatible with your system (32 bit / 64 bit).

Inside the zip file there is a folder named “Key”, and inside that you can find “key.txt” which contains the serial number.

When you first run the vuescan, it will ask you to register the product. Simply enter the email, customer Id and the serial key from the above key.txt file and as soon as you complete typing, it will show as “OK” in all the text boxes. This means your details are valid :) Click on OK button and continue scanning.

Please read this section if you are still getting the watermark.

Even though vuescan accepts your serial number as valid, it might still show the watermark. The reason is that Vuescan is not remembering your registration data. Here is how to fix that error.

Continue scanning your image as usual. When you are ready to save, do not click on save button. Instead, click on help menu item, and go to “About..”. A popup dialog will appear asking you to enter the Serial number. Now enter your data there and save the image.

Boom..No watermark B)

Please let me know your comments about this.

Happy Scanning :)

jQuery Validator Validate by class name

It’s no doubt that the jQuery Form validator is a big time saver for most of the web developers around. It helps you to do the client side validation of forms without any difficulty. Recently I wanted to validate a group of form fields (a several Price Fields), which should not allow negative values. But the existing rule I have being using was only that it is required. So I had to change that, and I found that I have been doing the validations based on the field name. But my current requirement is for many fields having the same rule. So I was looking for a way to get it done in a single rule (using the class name)

Here I have found two solutions to achieve this, and I share it with you all expecting it will help to save someone's time :)

Tip: Opt out your common rules and enter the other rules inside the $().validate() as usual. You can enter common rules inside below methods after this.

Method 01: Using jQuery Validator’s  .rules() method.

Ex : I want to validate all the price fields (having class “.price”).

$('.price').each(function() {
            $(this).rules("add", {
                required: true,
                min: 0

Note: You can use this only after the $().validate() method is called. Otherwise it will not work.

Method 02: Using the addClassRules() method.

This method is developed mainly for this type of validations. It does the iteration through all the elements by itself, which we did manually in method 01.

$.validator.addClassRules("price", {
     required: true,
     minlength: 2

Note: Unlike in method 01, you don't need this method to be after the $().validate() always. You can even call this method before the $().validate().

Please leave a comment and let me know if this was helpful to you.

Creating a simple 3D button with pure CSS

I'm sure that all of you might have seen a 3D (Three Dimensional) button in a website somewhere. There are many websites which use 3D buttons to grab the user attention;  they are really interesting to check out as well as to create.  So here is my very simple approach to create a 3D looking CSS 3 button. This is the very basic way to create a 3D button in CSS and it does what you expect. It has a 3D appearance; it has a 3D effect when you click on it :)

Here is the demo of the button.

NOTE: This was made only for fun. If you willing to use this in your website, you may consider to modify this.

            div { width: 100px;
                  height: 30px;
                  background: #F8D96D;
                  border-bottom: 7px solid #7F5A23;
                  border-left: 3px solid #7F5A23;
                  border-top: 1px solid #7F5A23;
                  border-right: 1px solid #7F5A23;
                  border-radius: 8px;
                  text-align: center;
                  padding-top: 10px;
                  color: #ffffff;
                  font-weight: bold;
                  font-size: 18px;
                  text-shadow: 5;
                  cursor: pointer;
                  text-shadow: 0px 2px 3px #555;

            div:hover {
                background: #F7D86B;
            div:active {
                border-top: 4px solid #7F5A23;
                border-bottom: 1px solid #7F5A23;



Please let me know your thoughts about this :)

Online HTML Preview

Online HTML Preview

online html previewHello friends, I developed another interesting tool for you today :)

Here is a little and a simple tool to write and preview html codes on the fly. Just type your html codes inside the textbox and see how it renders your html code below. Have fun…and make use of it.

Don’t forget to share this with your friends ;)

Type your HTML code here

Your Preview

 Tags : online html preview, html preview, online wysiwyg html editor, online html generator, online html editor wysiwyg, online html creator,online html editor with preview, online html text editor,online editor html, wysiwyg html

Oscommerce Password Generator

oscommerce password generator
Here is a little simple online tool for all those who are looking for a way to change the password of your oscommerce user account or your oscommerce admin account. You can simply put in your new password in the text box below, and click the generate button. This tool will generate the (MD5 + salt) hash which you can manually update in the database using phpmyadmin.

Note: Sometimes it might take 3,4 seconds to generate the password. Please be patient :)

Online Oscommerce Password Generator

Enter Your New Password :

Generated Password :

Get template file name in Wordpress easily!

You found a nice template for your Wordpress website, and then you noticed that you want to make some changes in that template to make it friendlier with your website. You have no idea which template file is delivering that content, and you don’t want to mess with a lot of codes to find that file name. You want a method to get the template file name easily.

Ok, here I have found an awesome, yet simple wordpress plugin which will do that task for you. It’s called “What the File!”.  It will show you the name of the template file which delivers the current content. Simple.

get the template file name in wordpress. What the File

First go to this link and Download the plugin. (or directly install it from Wordpress admin)

Once you complete the installation process and enabled the plugin, go to the page which you need to find the template file.

Then on the top admin navigation bar, you will find a new menu item called ‘What the File’. When you click on it, a dropdown menu will open with the template file name :).

You can click on that file name link. It will take you to the wordpress template editor page with that file opened their. All you have to do is edit.

If you wish to edit it outside the Wordpress admin panel, you can get the path and file name, then login through your FTP and make changes and upload it back.

I hope this article will surely save your time :) Please leave a comment to appreciate the time I spent to write this article if it was helpful to you.

Happy template editing ;)

Joomla Last Database Query!

joomla database queryJoomla is a popular CMS used in creating websites easily without need to know the web development languages such as html or php. However, if you are a web developer who develops custom modules or components for Joomla, you will definitely have to face situations where you need to print the last executed mysql database query for debugging purposes. The scope of this article is to show the way of printing the last query.

As I have already mentioned, the following method is very useful when debugging your database related bugs in your Joomla component or module. Let us assume that you are running a simple query as below;

$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->order('user_id ASC'); 

What I have done here is simply selecting all the data from my “my_users” table. I believe you already know what you have to do to get the data and print it from the above query. Let's say if you did not get the expected results from the above query, and you are sure that the table already has got data in it. Then definitely there should be something wrong with the query. So let's print it and see whether our query is properly generated. Adding the following lines below the above code will print the last query which is being executed.

echo $db->getQuery();
die(); //break the code below this line.

Now you can see the query in plain text, so you can check if there is anything wrong in it like incorrectly spelled table name, column name or any other mistake in your query. Also you can run this query in your phpmyadmin / or your mysql client software and see if it returns any data.

Joomla database query, Joomla Database, Joomla mysql Bug

Find the host name of the mysql connection in PHP

Find the host name of the mysql connection in PHPIf you ever face any situation where you want to get the name of the mysql host you / your web application is connected to, you can use the following little query and find it easily. I recently worked in a project which was initially developed by someone else, and I had to make some minor changes in the codings and the database tables. So I looked for the connection file and found out that the host name mentioned there was localhost (as usual). I had no cpanel login details with me. Besides, for database things what I usually do is, I make a connection to the database using my Navicat and run all queries there as it saves a lot of the time.

In cases where I need to find the host name, I use the following mysql query. Here is how you can use it in your PHP application and quickly find out the mysql hostname.

$sql = "SHOW VARIABLES WHERE Variable_name = 'hostname'";
$qdata = mysql_query($sql);
print_r(mysql_fetch_array($qdata)); // prints debug.

Now you can easily connect to the mysql database with your favorite database client.

Please feel free to leave a comment if this article was helpful to you :)

Embed FLV video in HTML

Embed FLV video in HTMLA “Video” is an essential element for many websites today. Unlike in early days, the usage of videos have significantly increased among internet users and the websites today. People tend to watch and react for videos very much than the usual static images. The availability of high speed internet connections and the many number of free video sharing websites like Youtube have made people to watch videos regularly. So as a webmaster, if you are not making use of videos in your website, you are losing many additional benefits you can get from your website.

When embedding videos in a website, you will have two options to select from.
  • Hosting your videos with a free video sharing website like “”. 
  • Hosting in your own web server.
The main focus of this article will only be on the second option. We are discussing how to embed a video in your website which is hosted on your own web server.

Also, note that we are specifically talking about embedding FLV videos only.

We know that with HTML5, a new tag for embedding videos was introduced to embed videos in your websites. That is very easy to use and you can find many articles in internet for HTML5 video embed code samples. But the bad thing about this great HTML5 video tag is, you can't use this tag to embed FLV videos in your website. So definitely you will have to go for an alternate solution, and in this article I will show you a nice script which you can use to embed FLV videos easily in your HTML website.

To embed FLV videos, we are using a swf file which can be downloaded from the following URL. 

Download the above file and place it in your root directory, or the directory you have uploaded your FLV videos. I recommend to keep your FLV videos and this .swf file in the same directory.

Now, in your web page where you would like to embed the FLV video, you can paste below code. Make sure that you change the file paths correctly.
<embed allowfullscreen="true" height="250" src="/videos/mediaplayer.swf?file=my_video.flv" width="400"></embed>
The output of the above code will be as shown below;

Embedding FLV video in HTML

According to the above example code, the “mediaplayer.swf” is uploaded to the 'videos' folder, and my FLV videos are also in the same directory. I can now simply call the flv video file only using its name 'my_video.flv' since both the video and the .swf file are in the same location.

Even though we have discussed only about FLV videos here, you should know that this method can be used to embed any other common video formats in your website. This method is very useful when inserting FLV videos, since the native HTML5 tag doesn't support FLV.

I hope my article was helpful to you. If you find any errors or mistakes in my article please feel free to correct me :) 

Embed FLV video in HTML, FLV Html5, HTML video embed