LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-21-2006, 12:56 AM   #1
padmakar
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
change root password


how to change the root password without knowing the earlier one.......
 
Old 11-21-2006, 01:22 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
One way is to boot up and use the kernel option "init=/bin/bash". This will run the root shell right away instead of init. Then use the passwd command and enter the new password.

Another method is to boot up with a rescue disk, mount your root directory and edit out the root password from either /etc/shadow or /etc/passwd. Then use the passwd command to create a new password.

You could have searched this site. This question has been answered many times.
 
Old 11-21-2006, 01:44 AM   #3
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,349

Rep: Reputation: 225Reputation: 225Reputation: 225
You could also just boot in single user mode.
This will boot in root without asking for a password and allows you to change your root password with the passwd command.

In Grub:
Edit the boot command and add "single" at the end of the line.

In LiLo:
Boot your system with "linux single"

Last edited by jens; 11-21-2006 at 02:02 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 11:28 PM
change Root Password even if the password in the grub is also set sheelnidhi Linux - General 6 08-30-2006 08:27 AM
change root password? ice99 Programming 1 08-10-2005 12:18 PM
Password change for root? akihandyman Mandriva 1 08-25-2004 11:29 PM


All times are GMT -5. The time now is 10:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration