Finally, the well known root password recovery is here to stay.
This old time favorite superuser root password recovery in linux comes as handy as a toolbox. Recovering root password in linux is as handy as newbie users during the very first linux installations.
The simplest way to recover root password before kernel can be accomplished with the following steps.
A. If you are sure you do not have any grub or lilo password set, basically you do not need to boot from boot CD or DVD. Without grub or lilo password set, recovering linux root password is as easy as booting the linux kernel into its linux single mode.
This linux single mode basically loads up minimal boot up sequence and drops you to a root shell. One way to boot from linux single mode is by passing an kernel arguments before kernel boot up.
How to make kernel boot into linux single?
How to pass kernel arguments before bootup?
During bootup, by default installation, Fedora, CentOS, and RedHat prompts for a few seconds before booting its linux kernel. This is a chance for the user to edit any needed kernel arguments before the normal kernel boot up process.
You must hit any key from this prompt. Then select the line that starts with kernel. From this line, press the letter 'e' for editing and appending additional kernel parameters. Our intention here is to pass additional kernel parameter called 'linux single'. You will be taken to boot menu list from where you can now append the below line:
linux single
This parameter boots the kernel in linux single mode. As an example
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
title Fedora 7 (2.6.21-1.3194.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet linux single
initrd /initrd-2.6.1.3194.fc7.img
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noticed the a bold emphasis from the kernel line with 'linux single' or 'single' kernel parameter. After passing the linux single word, hit 'b' or Enter key to normally resume kernel boot up process. You will dropped into normal shell prompt. At this point, you are the superuser root. Issue
# passwd
to set a new root password like so
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Changing password for user root.
New UNIX password:
BAD PASSWORD: it is WAY too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After succesfully changing root password, reboot properly by issuing
# reboot
This would reboot your system. You can now use your new root password
B. If you happen to have a grub or lilo password, a boot CD/DVD or disk 1 of your linux installation is required to achieve the same steps of changing your root password. Alternatively, you can boot from other linux OS like Knoppix or any LIVE CD / LIVE DVD, as long as it matches your box architecture.
All you need to do is insert your bootup CD or DVD from your CD/DVD drive and boot from the CD/DVD drive. Any attempt to boot from this first installation CD would take you to a startup menu wherein you can also pass additional kernel parameters.
From there, pass the required 'linux single' kernel parameter. This would also take you to normal shell prompt wherein you can issue the linux command passwd to change your root password. After this, simply issue the linux command reboot.
The above approach works all the time.
You are now back with your newly changed root password after booting up normally.
Subscription
Categories
- HowTos (612)
- Linux Devices (40)
- Linux Diggs (620)
- Linux News (1541)
- Linux Videos (24)
Recent Posts
Blog Archive
-
▼
2007
(340)
-
▼
August
(95)
- KCron - GUI task scheduler
- Linux backups powered by Tar
- INQ7 front page image retrieval
- using wget for data and file transfers
- BibleTime - Bible study from Linux howto
- human readable DVD/CD drive technical details
- sound-juicer - alternative audio CD ripper install
- Stellarium - watch the sky from Linux
- Munin - monitor linux hosts install howto
- blocking yahoo chat messenger
- string manipulation using cut linux command
- graphing skystream DVB receiver's Eb/No and signal...
- BZFlag - 3D multi-player tank game install howto
- screenshot and snapshot creations howtos
- string parsing using bash
- grep multiple character from string or file
- enable and disable of telnet service
- grep multiple strings from a file
- remove spaces from filenames
- ISO creation and CD/DVD burning from terminal
- send a message to user's terminal
- retrieve GMail emails via terminal using fetchmail
- more of activating and deactivating network card
- set new mysql password
- TIP: enable thumbnail display images from apache
- monitor large mailbox users
- using the linux yes command
- string manipulation using tr linux command
- install and play 2D chess game in linux
- more firefox tips and tricks
- recover root password on linux
- establish ssh connection from different port
- uniq linux command
- remove blank lines using grep or sed
- date and time sync via NTP server howto
- who am I
- delete spam email and folder regularly howto
- hello world bash and perl script
- passwordless rdesktop session with XP howto
- force VGA screen resolution and screen mode
- RealPlayer 10 for linux install howto
- Grip - CD ripper install howto
- Banshee - music management and playback
- gnome music applet install howto
- Pirut and yum-updatesd - software management
- Alacarte - editing panel menus install howto
- access NTFS drive in Fedora
- FileLight - graphical disk usage and statistics
- TestDisk- partition tool install howto
- using /dev/null in linux terminal
- yahoo messenger in fedora install howto
- check and repair MS-DOS file systems howto
- using fdformat and mkdosfs from terminal
- Tremulous - Quake 3 install howto
- block consecutive IP address using scripts
- using floppy linux command from terminal
- display word or text file in reversed pattern
- convert a file to equivalent hex/binary code
- spell check text file from terminal
- create screen timer from linux howto
- recreate deleted /dev/null
- harddisk monitoring using smartctl
- bind ssh to selected IP address
- restrict su command to superuser only
- thunderbird install howto
- dovecot POP3/POP3S server with SSL/TLS install howto
- qpopper POP3 server install howto
- my other linux pages
- more ssh log parsing and monitoring
- checking daemon service bash script
- HTML CHM help file viewer install howto
- du - the disk usage linux command howto
- gnome language translator install howto
- display linux memory information howto
- display the number of processor howto
- 3d tabletennis game install howto
- Nokia N70 on Fedora via USB data cable
- Fedora 7 as guest host from VirtualBox
- at - jobs scheduling howto
- Nokia 70 linux connection via bluetooth dongle howto
- crontab - jobs scheduling howto
- managing daemon services howto
- create your own linux OS distro howto
- kernel devel headers install howto
- more multimedia browser plugins install howto
- numlock on with X install howto
- Fedora and RHEL differences
- create virtual terminals with single ssh connection
- virtual CentOS using VMWare 5.5.4 install howto
- VMware workstation 5.5.4 install howto
- 50 quick linux command tips part 4
- 5 SysAds permanent static route story
- ssh log parsing and monitoring
- removable drives, devices and media preferences
- gnome-blog desktop blogging install howto
-
▼
August
(95)
Wednesday, August 22, 2007
recover root password on linux
Subscribe to:
Post Comments (Atom)
ILoveTux - howtos and news | About | Contact | TOS | Policy
0 comments:
Post a Comment