Friday, October 10, 2008

how to remove autorun.inf virus

Tired from the autorun.inf virus from Removable disk and pen drives.

Here is the solution,

create a directory named "autorun.inf" in the root path of your removable disk,
so virus will never create that automatically and never executed automatically.....

enjoy !!!

be safe & keep others OS safe ;-)

Friday, October 03, 2008

How to change postgresql data directory

How to change postgresql data directory.
  1. vim /etc/postgresql/8.2/main/postgresql.conf
  2. set data directory path to the new directory path
  3. Create new Server Certificate
    1. openssl req -new -text -out server.req
    2. openssl rsa -in privkey.pem -out server.key
    3. rm privkey.pem
    4. openssl req -x509 -in server.req -text -key server.key -out server.crt
    5. chmod og-rwx server.key
    6. chown postgres:postgres server.key
  4. Stop and Restart Postgresql server
References:
  1. http://developer.postgresql.org/pgdocs/postgres/ssl-tcp.html
  2. http://www.linuxquestions.org/questions/linux-server-73/change-postgresql-data-directory-649911/
  3. http://www.postgresql.org/docs/8.3/static/runtime-config-file-locations.html

Saturday, September 06, 2008

Install Adobe Repository On Fedora, CentOS

Install Adobe Repository
  • rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
  • rpm import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
    • If that doesn’t work, try this from Mozilla Firefox instead.
    • http://www.adobe.com/go/getflashplayer
    • Select YUM for Linux.
    • Select Agree and install now.
    • adobe-release-i386-1.0-1.noarch.rpm is the file at the time I wrote this.
    • Single right-click from the Mozilla Firefox Downloads window
    • Sinlge left-click on Open
      • Single left-click OK to Do you want to install this file?
      • /home/username/Download/adobe-release-i386-1.0-1.noarch.rpm
    • Type the password for the root account to confirm.
    • Single left-click the Authenticate button.
    • adobe-release-i386-1.0-1.noarch.rpm should install after a few seconds.
  • yum install libflashsupport.{i386,x86_64} nspluginwrapper.{i386,x86_64} pulseaudio-libs.i386
  • mkdir -p /usr/libmozilla/plugins
  • yum install flash-plugin
  • mozilla-plugin-config -i -g -v
Other References:

Saturday, August 30, 2008

Installation of Adobe Flash Player 9 on 64 bit Linux

Follow the simple series of commands in order to install the Adobe Flash player 9 on 64 bit Ubuntu.

Can't view open flash chart or can't able to play flash on your browser, follow the simple steps to install it on 64 bit linux machines.

  1. wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_9_linux.tar.gz
  2. tar -zxf install_flash_player_9_linux.tar.gz
  3. mkdir ~/.mozilla/plugins/
  4. mv install_flash_player_9_linux/flashplayer.xpt install_flash_player_9_linux/libflashplayer.so ~/.mozilla/plugins/
  5. nspluginwrapper -i ~/.mozilla/plugins/libflashplayer.so
  6. close all firefox instances and restart iceweasel/firefox/whatever

Tuesday, August 19, 2008

how to clear subeclipse password (svn for eclipse)?

Both subversion and subclipse cache usernames and passwords. Sometimes it is necessary to manually change the authentication information, e.g. to clear the password after it has changed, or occasionally, to update the username.

Anyone that uses subclipse (the subversion client for eclipse) that has needed to change the username or password for a stored repository, knows that there is no obvious way to do this. Luckily, I ran across this post. Unfortunately, it left some important details out.

If subclipse is setup to use JavaHL (which it is by default: check in Preferences > Team > SVN > SVN interface), then the passwords are stored in the same location as if the command-line svn tool was used. For unix-based systems (or using the command-line tool under cygwin), this is in ~/.subversion/auth/svn.simple. On windows it is in c:\Documents and Settings\[username]\Application Data\subversion\auth\svn.simple. It looks like there is one file per repository in this directory (the filename is a long hexadecimal number). This file contains your username and password.
On the other hand, if subclipse is configured to use the JavaSVN adapter, the .keyring file mentioned in the post appears to be located in the eclipse directory (not the workspace, the actually directory where the eclipse executable is found) under configuration/org.eclipse.core.runtime/.keyring. This is a binary file and hence must be deleted.

A few complaints: (1) I don’t like the fact my password is stored plaintext in a location where others frequently have at least read access to (this is especially true in Windows) (2) if the keyring is stored in the Eclipse directory that means all users share the same authentication information. That means someone else on the computer could access my subversion repositories as me!

This seems like a huge security whole.

Thursday, July 10, 2008

How to save Linux Boot Loader

Needs to Reinstall Windows & wants to Save Your Linux Boot Loader....
Save your Linux boot loader for windows boot loader (for any linux Operating System)
  1. sudo su root
  2. dd if=/dev/sda of=/media/drive_c/ubuntu7.img count=1 bs=512
  3. now open windows c:\boot.ini file and append following line

    1. c:\ubuntu7.img="Load My Ubuntu boot Loader"
Note:
  • /dev/sda stands for your hard drive it might be different use according to your hard disk.
If you don't know you can get it from the following command
  • sudo su root
  • cfdisk
/media/drive_c is the mounted file system for your Drive C
If you are not able to mount, then use the path ~/home/ubuntu7.img and you can take back up of the file using any USB Device. and then switch to windows and put it into the boot.ini and modify it

  • Tested with Ubuntu 7.10 and 8.04 and Fedora 7, but it will work for any Linux OS
  • How it works? => This will generate a file named ubuntu7.img which contains starting 512 bytes of your hard disk.