Wednesday, August 11, 2010

Changing grub password in Linux

Here is the steps of changing grub password even after loading the OS

(1) # grub
 grub> passwd: **********
 grub> Encripted: $1$CxcdNVbcfsgUEFd0

Now copy the password-hash ie Encripted value

(2) Edit grub.conf file and paste the password-hash

# vi /etc/grub.conf

passwd --md5 $1$CxcdNVbcfsgUEFd0

(3) Now save the file and restart the system.

How to reset root and grub password in Linux

This blog post illustrates three methods to break the root / grub password

METHOD 1

HOW TO RESET UR ROOT PASSWORD IF U FORGET IT

While Booting ( Redhat ) just press "e" in GRUB

u will find 3 lines of code..

Goto to the 2nd line press "e"again and type "1" in the end

then press ENTER..

Then press "b" and it will boot you into your shell..

Just type "passwd" and change your ROOT password...

don't need to know the old one..


METHOD 2

"I, uh, forgot the root password"

Let's look at recovering the root password from the boot loader. If you're using GRUB, then, as GRUB loads up, highlight the Red Hat Linux entry on the GRUB menu and then press [E] to edit the boot configuration. Locate the following line, something that looks like this:

kernel /boot/vmlinuz-2.4.20-0.70 root=LABEL=/hdc=ide-scsi

Type the number '1' at the end. Doing so boots the PC into run level 1-single user mode, where you're automatically logged in as root. This done, type 'passwd' at the prompt. You can enter a new password here.


METHOD 3

To break the GRUB start-up password, follow the steps given below:

1. Boot the system with the first Linux CD. At the boot prompt, type linux rescue to switch to rescue mode. In rescue mode you will be asked if similar steps should be followed, which need to be followed in the installation. Once you get the # prompt, type the following command:

# chmod /mnt/sysImage

2. Edit the grub.conf file and remove the passwd line from the file. Save the file and exit.

3. Once your machine reboots, you will be able to start your Linux OS in the usual manner.

Tuesday, August 10, 2010

RHEL on SATA HDD

During installation of Linux (RHEL) on a SATA HDD, it can give PCI probing error and/or disk error.

Two changes must be done before loading the RHEL on a SATA disk.

(1) In BIOS:

In advance option change SATA as IDE

(2) Insert CD-1 and type the following line on boot: prompt-

boot: linux pci=nommconf
or
boot: linux all-generic-ide noapic nolapic
or
boot: linux all-generic-ide
or
boot: linux nommconf all-generic-ide
or
boot: apm=off acpi=off

Now you can load RHEL-5 on your SATA HDD.

Installing Printer in Linux / Ubuntu

Here is the procedure to install printer with the Zenographics ZjStream wire protocol.

There are many printers that use the Zenographics engine. I have compiled a list below:


Printer Model                          foo2zjs Identifier

HP Color LaserJet 2600n                2600n

HP Color LaserJet 1600                 1600

Konica Minolta magicolor 2530DL 2530

Konica Minolta magicolor 2490MF 2490

Konica Minolta magicolor 2480MF 2480

Xerox Phaser 6115MFP                 6115

Konica Minolta magicolor 2430 DL 2430

Minolta/QMS magicolor 2300 DL   2300

Minolta/QMS magicolor 2200 DL   2200

Minolta Color PageWorks/Pro L     cpwl

Samsung CLP-300                          300

Samsung CLP-600                          600

Samsung CLX-2160                       2160

Samsung CLX-3160                       3160

* Okidata 3200n                             3200

* Okidata 3300n                             3300

* Okidata 3400n                             3400

* Okidata 5100n                             5100

* Okidata 5200n                             5200

* Okidata 5500n                             5500

* Okidata 5600n                             5600

* Okidata 5800n                             5800

Xerox Phaser 6110 and 6110MFP 6110

Lexmark C500                               500

HP LaserJet 1020                          1020

HP LaserJet 1018                          1018

HP LaserJet 1005                          1005

HP LaserJet 1000                          1000

HP Laserjet P1005                        P1005

HP Laserjet P1006                        P1006

HP Laserjet P1505                        P1505
-------------------------------------------------------------------------------
PROCEDURE (A):-

(1) Download driver

$ wget -0 foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz

(2) Unpack it

$ tar zxf foo2zjs.tar.gz
$ cd foo2zjs

(3) Compile it

$ make

(4) Get extra file and firmware

$ ./getweb 1020    # for e.g.  HP 1020 Printer

(5) Install driver

$ sudo make install
or
# make install

(6) Configure hot-plugins (optional)

# make install-hotplug

(7) Restart Spooler

# make cups

(8) Now Add a printer

# printconf-gui
---------------------------------------------------------------------------------
PROCEDURE (B):-

Download the script to your home folder (Ubuntu Feisty/Edgy/Dapper).


wget http://www.stchman.com/tools/foo2zjs/ubuntu_foo2zjs_install.sh

Download the script to your home folder (Ubuntu Gutsy)

wget http://www.stchman.com/tools/foo2zjs/ubuntu_foo2zjs_install_gutsy_hardy.sh

Change the permission to executable on the script (Ubuntu Feisty/Edgy/Dapper).

chmod 755 ~/ubuntu_foo2zjs_install.sh

Change the permission to executable on the script (Ubuntu Gutsy and Hardy).

chmod 755 ~/ubuntu_foo2zjs_install_gutsy_hardy.sh

Run the script with the proper foo2zjs Identifier.
It is imperative that you select the proper printer as the proper firmware needs to be loaded. Substitute with the proper number in colume one from the chart above. If you have a Laserjet 1000 then substitute 1000 for . A number other than one from the chart will cause the script to terminate.
Ubuntu Feisty/Edgy/Dapper

sudo ~/ubuntu_foo2zjs_install.sh

Ubuntu Gutsy and Hardy

sudo ~/ubuntu_foo2zjs_install_gutsy_hardy.sh

The script will launch the Gnome CUPS Manager for Feisty/Edgy/Dapper or System Printer Configuration tool in Gutsy. Select your printer and folow the onscreen selections.

Remove the script as it is no longer needed.
The script will take care of removing the archive and all associated temporary files.

Ubuntu Feisty/Edgy/Dapper

rm -f ~/ubuntu_foo2zjs_install.sh

Ubuntu Gutsy and Hardy

rm -f ~/ubuntu_foo2zjs_install_gutsy_hardy.sh

Your Zenographics based printer should now function under Ubuntu as well as it does under WIndows. Cycle power on the printer and reboot your computer.

Happy printing :)

Tuesday, August 3, 2010

Secure your system over the net

If You are an Internet user, then this is for you...........

Make following setting in your PC / Laptop for more secure net surfing. I am showing the screen shots of Windows XP. More or less its same for Windows 7, Vista and Windows 2003.

(1) Disable autoshares. Follow the link for more details;

How to disable auto shares

(2) Disable vulnerable ports .Follow the link for more detail;

How to disable TCP/UDP ports

(3) Disable Remote deskop

My Computer ->Properties ->Remote ->Remote Desktop then uncheck the check box.






















(4) Login as user not administrator / root privileged user while surfing the net.

How to install Java in Ubuntu

There are two methods to install JRE/JDK in Ubuntu
(1) Online:

#sudo apt-get install sun-java6-jre (for users)
#sudo apt-get install sun-java6-jdk (for developers)
#sudo apt-get install sun-java6-plugins (java plugins)
#sudo apt-get install sun-java6-fonts (java fonts)
Or you can run all commands together
#sudo apt-get install sun-java6-jre sun-java6-plugins sun-java6-jdk

(It will download JRE/JDK from Sun site and install in your system)

To check java version
#java -version

Or type in FireFox URL
about:plugins
It will display installed java plugins.

(2) Offline:

(a) Non -RPM package (bin)

(i) Download the JDK from Sun
(ii) Click on the "Download" link in the JDK 6 section.
(iii) Accept the license and continue.
(iv) Under the "Linux Platform", select "self-extracting file".
(v) Download this .bin file and save it to your GNU/Linux machine.
(vi) Once it has been downloaded, switch to the directory where you saved the file.You do not need to be a root and only must have the write access to the folder where you wish to install java. If your   administrator is not supportive, you may need to place java into your home folder or even better on some shared network location.
(vii) Type sh name_of_the_downloaded_file, for instance sh jdk-6u2-linux-i586.bin. There is no need tomake this file executable.
(viii) The license agreement should start appear on the screen. Scroll to the end of it with 'Enter' and type  yes.
(ix) This installer will create its installation in the same folder, where the downloaded file was placed and  from where you have started the installation script. But the installed java jre is rather independent and can be easily moved into another place just by copying all its files.
(x) You can install multiple different jre's this way: they coexist together and can be used if some software requires the older version to run.
(xi) The java executable you need to launch is located in a subfolder, called 'bin'. This way of installation will not configure a default 'java' command for you: you must do this manually or always include the full path in your startup script.

(b) RPM package

(i) Download the JDK from Sun
(ii) Click on the "Download" link in the JDK 6 section.
(iii) Accept the license and continue.
(iv) Under the "Linux Platform", select "RPM in self-extracting file".
(v) Download this .bin file and save it to your GNU/Linux machine.
(vi) Once it has been downloaded, login as root and switch to the directory where you saved the file.
(vii) Execute './filename', where filename is the name of the file that you downloaded. The filename might be very similar to jdk-6-linux-i586-rpm.bin depending on what the latest version is. You may have to make the file executable by executing the 'chmod +x filename.bin' command.
(viii) You will get a license, press space bar a bunch of times until you are prompted to enter yes or no. Type in yes and hit enter.
(ix) This will place an .rpm file in the same directory as your .bin file with the same name (minus the .bin part).(x) Install the rpm file by executing 'rpm -i filename.rpm', where filename is the name of your .rpm file. (Such as jdk-6-linux-i586.rpm).
(xi) Now, if you want to be able to execute this version of Java interpretor or compiler from any directory on your GNU/Linux system you will have to create a few symbolic links:

     ln -s /usr/java/jdk1.6.0/bin/java /usr/bin/java
     ln -s /usr/java/jdk1.6.0/bin/javac /usr/bin/javac

(xii) You are done!

BL Baliyase :-)

Monday, August 2, 2010

Blocking blacklisted sites for Internet users

In Windows:

In Windows sites are restricted through browser settings or the firewall settings:
IE browser setting:
In the Menu bar select Tools ->Internet Options (as shown in fig-1)



















                                       (fig-1)

Now form Internet Options dialog select Security -> Restricted sites -> Sites (as shown in fig-2)



















                           (fig-2)

Now enter the url of the blacklisted sites and click Add (as shown in fig-3)


















                         (fig-3)

Now click close->Apply ->OK.

You can also make entry in %systemroot%/system32/driver/etc/hosts file as below:
127.0.0.1       www.xyz.com

In Linux (Ubuntu /RHEL):

Its very simple to restrict a site in linux based system.

gedit or vi /etc/hosts and make the following enrty:

0.0.0.0     www.orkut.com (any site you want to restrict)
0.0.0.0     www.facebook.com

or
127.0.0.1   www.xyz.com

Find out Hardware configuration of Linux / Ubuntu based system

In Windows OS based system its very easy to find out the system configuration by following commands:
(1) Run -> msinfo32
(2) Run ->cmd -> systeminfo
( You can even redirect the ouput from monitor to printer or a file by suffix the above command with > file_name.txt )

In RHEL or Ubuntu its similarly easy too:

(I) Using /proc - there's important info located in this directory! cd /proc, then ls; use cat to read the files in /proc such as cpuinfo, devices, filesystems, meminfo, partitions, swaps, uptime, version, etc.; also, you can cd into the subdirectories in /proc, for example cd driver
(1)# cat/proc/cpuinfo >cpu.txt
(2)# cat/proc/meminfo >mem.txt
(3)# cat/proc/swaps >swap.txt
(4)# cat/proc/version >ver.txt

(II) Using dmidecode (for memery)
# dmidecode | less
or
# dmidecode >dmi.txt
or
# dmidecode -t memory
or
# dmidecode --type 17

Wednesday, April 1, 2009

Speed-up your Internet connection

The Truth
The system reserves 20% of your band-width. Means you are paying your ISP for 100% , where as you are using only 80% of it. Cheated na....
How to free your Band-width
(1) Run -> gpedit.msc
(2) Local Computer Policy -> Computer Configuration -> Network ->QoS Packet Scheduler -> Limit reservable bandwidth



(3) Double click Limit reservable bandwidth



(4) Click Enable and set Bandwidth limit to 0 %

Now you will be able to use 100% of your Internet band width.

BL Baliyase :)

Monday, March 16, 2009

Make a Hidden Folder ( Folder without name)

(1) Right Click on desktop ->new -> Folder
(2) Rename folder ATL + 255 ( Press ALT Key and type 255 with numpad).
(3) Right Click the Folder -> Properties ->Customize -> change icon.
(4) Select the blank icon.



You are done.........
Where is your folder ???

BL Baliyase :)