Wednesday, November 11, 2009

How to set the first day of the week to Monday

Hey.

In some countries (e.g. US) Sunday is thought as the first day of the week. But in others (e.g. Russia) Monday is the first day.

As long as Ubuntu has US citizenship its default first day of the week is Sunday. So, here is how to make it Monday. Talking about Gnome right now.
  1. We need to know which locale we are using (mine is en_US, don't worry about the .UTF ending). So, run locale in the shell
  2. Now we need to backup the applicable locale file just in case so we can safely edit it. Use the result of the previous command
        sudo cp /usr/share/i18n/locales/en_US /usr/share/i18n/locales/en_US.bak
    sudo vim /usr/share/i18n/locales/en_US
  3. Locate the following line and change the value. The value for Monday in en_US is 2. So, we need to use number 2: first_weekday 2
  4. Now we save the file and then we update the locales. Run this in shell:
        sudo locale-gen
  5. Now we need to reboot the machine or just refresh the desktop with this command:
        killall gnome-panel

Now Monday is the first day of the week. Neat! :)

Got this from Ubuntu forum.

Sunday, November 1, 2009

Ophcrack to get Windows admin password

I knew that was possible but never had a chance or reason to try. But yesterday I needed to install something on my friend's Windows XP laptop under admin account, but he had only the password for his restricted account.

So, here is what I did:
  1. I had Ophcrack Live CD downloaded from here
  2. Then UNetbotin tool came in hand to make my USB flash drive bootable with Ophcrack. Actually there was no need to separatelly download .iso image as UNetboot can be used to load various system utilities including Ophcrack as well as it can load various Linux distos
  3. I booted my friend's laptop from this USB stick (had only to check the video mode)
  4. Ophcrack started automatically, so I stopped it (this is optional of course) to delete some users from the list to reduce password cracking time by Ophcrackinging :) only the admin user
  5. About 10 minutes it took to get a88nr24 admin password
That is it.

You can read more about Rainbow Tables used in Ophcrack here and more sofisticated here...oh, what the hell! Just google it! :)

The methods like this one were no good for my task as it was not enough access rights.

Friday, October 23, 2009

How to make middle button in Firefox in Linux behave like in Windows


Hey, long time no see. :)

Here's a little how to. I find it useful when you can click middle button on your mouse and then scroll through the page just by moving the cursor.

This Firefox behavior is default in Windows but not in Linux.

So, here is how to fix it:
  1. In the Address Bar type in about:config and hit Enter. This will open the Advanced Preferences in Firefox
  2. In the Filter bar type in middle and you will see about 5 options
  3. Double click middlemouse.contentLoadURL so that it changes to false
  4. Double click middlemouse.paste so that it changes to false
  5. In the Filter Bar type in scroll and you will see about 20 options, and the second one down from the top is general.autoScroll. Double click general.autoScroll so that it changes to true
  6. Now you can just close your browser and the settings are saved

Got it from here.