LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-20-2006, 11:56 PM   #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, 12:22 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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, 12:44 AM   #3
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,463

Rep: Reputation: 299Reputation: 299Reputation: 299
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 01:02 AM.
 
  


Reply



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 10:28 PM
change Root Password even if the password in the grub is also set sheelnidhi Linux - General 6 08-30-2006 07:27 AM
change root password? ice99 Programming 1 08-10-2005 11:18 AM
Password change for root? akihandyman Mandriva 1 08-25-2004 10:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:44 PM.

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
Open Source Consulting | Domain Registration