Sunday, February 6, 2011
Saturday, February 5, 2011
Reset forgotten Ubuntu password

Login as root
There is two possible ways to login as root :
* Common method
You can login with root mode just by pressing ESC button when system starting up. That’ll take you to Grub Screen, when you can select mode that you’ll be used while booting. If you have double OS or more on your system (dual boot), you don’t need to do this step. It’s automatically go to Grub Screen when system starting up.
Then choose the “recovery mode”, usually found right below your default option. Press enter, and at the next screen, choose “drop to root sheel prompt” and you’ll login to the system as root .
* Advanced method
On some system, maybe you can’t find “recovery mode” on Grub Screen menu. So? You need to do a “little hack” to the Grub Loader. Looks cool right? In fact its very easy .
On Grub Screen menu, select default loader (first choice) and press “E” key that means you’ll edit manually that loader. Wow .
On the next screen, find row that contains this word :
ro quiet splash
Then replace that with this :
rw init=/bin/bash
After that, press “CTRL”+”X” (or maybe “B” key on your system, depend to your kernel) to boot the system with “hacked” loader .
Done! You’re logged in as root on your system now, and you can do anything you want. Including resetting your password!
Resetting your password
Use this command to reset your password :
passwd [username]
Fill username with username that you want to reset its password. You’ll prompt new password twice.
In this step, you’re almost done! Now, make sure the change you’ve made will be written to disk by :
sync
Reboot your system :
reboot -f
You’re done! Your password has been reset, and you can login to your system now .
I’ve been using this method on my Ubuntu Lucid system and its work. I hope this post is useful for you all. If you have problem when implementing this article, leave a comment and I’ll be glad to help you.
ANOTHER WAY IS
If you forgot you password for your ubuntu system you can recover using the following steps
Turn your computer on.
Press ESC at the grub prompt.
Press e for edit.
Highlight the line that begins kernel ………, press e
Go to the very end of the line, add rw init=/bin/bash
press enter, then press b to boot your system.
Your system will boot up to a passwordless root shell.
Type in passwd username
Set your password.
Type in reboot
Download Manager
UBUNTU DOWNLOAD MANAGER CLICK HERE
Wednesday, December 22, 2010
How to change login screen
sudo cp -f /usr/share/applications/gnome-appearence-properties.desktop /usr/share/gdm/autostart/LoginWindow/
then logoff. you can get a properties window on the login screen.
Thursday, December 2, 2010
Monday, November 22, 2010
JAVA CLASSPATH SETTING IN UBUNTU
enter your password
PATH=".:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" (already exist)
just add below two lines
here i am using java6
JAVA_HOME="/usr/lib/jvm/java-6-openjdk"
CLASSPATH=".:/usr/lib/jvm/java-6-openjdk/lib"
save that file.
Sunday, November 21, 2010
2) REINSTALLING GRUB 2 AFTER WINDOW INSTALLING
After reinstalling Windows in the computer dual boot with both Windows and Ubuntu Linux,you need restore grub because mbr has been rewritten.This tutorial shows how to restore grub 2.
Update:Today I ghost my XP system,but after restore grub,I cannot boot into XP by clicking the old windows option in grub menu.So you’d better to run this command to renew the grub2 boot list after trying following method:
sudo update-grub
1).Using grub4dos
First download grub4dos from here.
1. For XP user,copy the file “grldr”(without quotes) from grub4dos package to C:\.Edit boot.ini (hidden file in C:\) and add this line to the file:
c:\grldr="grub4dos"
For Vista/win7 user,copy the file “grldr”,”grldr.mbr” to C:\.Create boot.ini file in the root directory of C:,copy and paste following into this file.
[boot loader]
timeout=0
default=c:\grldr.mbr
[operating systems]
C:\grldr.mbr="Grub4Dos"
2. Now,create menu.lst in root directory of C:,its content:
timeout 0
default 0
title grub2
find --set-root /boot/grub/core.img
kernel /boot/grub/core.img
boot
Restart computer,and select boot from Grub4Dos.Then select boot up Ubuntu in grub menu.
Once login,use this command to install grub into mbr:
sudo grub-install /dev/sda
2).Using Ubuntu 9.10 livecd or higher
Here assuming the Ubuntu partition is sda7,and /boot partition is sda6 (if you have a separate /boot partition).
Boot up ubuntu from the livecd,open terminal and run:
sudo -i
mount /dev/sda7 /mnt
mount /dev/sda6 /mnt/boot #skip this one if not have a separate /boot partition
grub-install --root-directory=/mnt/ /dev/sda
If you miss “grub.cfg” file,use following to recreate:
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
chroot /mnt update-grub
umount /mnt/sys
umount /mnt/dev
umount /mnt/proc
exit
3).Using the cd/usb boot up with grub
Boot up the cd/usb,press c in grub menu.Type:
grub>find /boot/grub/core.img
grub>root (hdx,y) (previous command will output the x,y)
grub>kernel /boot/grub/core.img
grub>boot
After the boot command,you’ll go into grub2 menu.Select to boot up ubuntu,and run this command to restore grub:
sudo grub-install /dev/sda