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 04-15-2005, 11:02 PM   #1
SlowMindThinkin
Member
 
Registered: Sep 2004
Posts: 144

Rep: Reputation: 15
root password doesn't work


Ok, I'm not exactly a noob, but this is a noob problem.

I'm not sure how or why, but the root password has stopped working. I changed it a few days ago, but no, I did not forget it. I use that root password on a few other computers for which I have root/admin needs. (Is it possible my kids locked root out? Or that it is corrupted?) At any rate, I can no longer log into Yast as root. And yes, I have tried that old windows standby. I shut down and let it sit a while, but the problem persists.

Short of reformatting, is there anything I can do?

I am running Suse 9.1. (I plan to switch to 9.3, as soon as I check into it a bit more.)
 
Old 04-15-2005, 11:53 PM   #2
Kdr Kane
Member
 
Registered: Jan 2005
Distribution: SUSE, LFS
Posts: 357

Rep: Reputation: 30
Boot off your install CD. Go to the command line. chroot to /dev/hdxx. Run passwd command to change the password.

There are plenty of better explanations if you search the forums.
 
Old 04-15-2005, 11:54 PM   #3
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there

boot from any linux cd in to rescue mode

at the promt

run fdisk -l

and see what is ur linux root parttion
assuming it is /dev/hda2

then

mkdir /tmp/linux

chroot /tmp/linux

then

passwd root

and set ur new passwords

regards
 
Old 04-16-2005, 03:27 AM   #4
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 54
Or if you don't have a CD at hand, boot to the lilo splash, highlight the kernel, hit tab, type single, and hit enter to boot into single user mode. Then you can type passwd to change the root password. Reboot and it should work.
If you use grub, google for: grub single user mode.
 
Old 04-17-2005, 03:36 PM   #5
SlowMindThinkin
Member
 
Registered: Sep 2004
Posts: 144

Original Poster
Rep: Reputation: 15
Thanks guys. I'll give it a shot as soon as I finish with this session. (Any idea how many search results you get when you search for words like "root", "password", and "login"?!)
 
Old 04-17-2005, 03:51 PM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
u should have looked for
" restore root password"

to get good results

regards
 
Old 04-17-2005, 04:48 PM   #7
SlowMindThinkin
Member
 
Registered: Sep 2004
Posts: 144

Original Poster
Rep: Reputation: 15
No joy.

masand, I even searched with your much better choice of words, but ...

I used my Suse dvd to boot into rescue mode
I then typed:
fdisk -l
It told me that /dev/hdc1 is my Linux partition

I assume you left out chroot /dev/hdc1 (which was in Kdr Kane's post)
It failed with "cannot change root directory to /dev/hdc1: Not a directory"

if I just try passwd or passwd root, I get a different error message:
"User not known to the underlying authentication module"

I assume that means Grub doesn't know root?
 
Old 04-17-2005, 09:39 PM   #8
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 24, 25, RHL 5.2
Posts: 560

Rep: Reputation: 56
What you need to do after booting with the rescue disk is mount /dev/hdc1 to a directory, something like /mnt/sysimage. Then you chroot to that directory. Once there you should be able to change your root password with the passwd command.

I would recommend going into single user mode since it takes less time. Since you are using grub you will need to go into edit mode when it comes up. Once there, you need to change the line that has your kernel on. All you have to do is add a "1" after the kernel. For example...

FROM:
kernel /boot/vmlinuz-2.6.5-1.358 ro root=/dev/hda2
TO:
kernel /boot/vmlinuz-2.6.5-1.358 1 ro root=/dev/hda2

After you change it type "b" and the system will boot into single user mode.

Bill

Last edited by wmakowski; 04-17-2005 at 09:40 PM.
 
Old 04-17-2005, 10:12 PM   #9
SlowMindThinkin
Member
 
Registered: Sep 2004
Posts: 144

Original Poster
Rep: Reputation: 15
GOT IT!

THANKS!

You might be glad to know that I donated a small sum to linuxquestions.org (along with a few other linux orgs from masand's thanks button link).
 
Old 04-17-2005, 11:19 PM   #10
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
thanks for that

i missed out one step in my last post

so u need to do this
------------
run fdisk -l

and see what is ur linux root parttion
assuming it is /dev/hda2

then

mkdir /tmp/linux

mount /dev/hda2 /tmp/linux

chroot /tmp/linux

then

passwd root

and set ur new passwords
---------------------
regards
 
  


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
root password doesn't work when I use sudo ... bucovaina78 Linux - Security 5 11-10-2004 02:50 PM
No GUI on boot and root password will not work. darthnalm Mandriva 1 08-26-2004 07:06 PM
KDM root password won't work linda Slackware 6 08-12-2004 04:58 PM
root password doesnt work MAGOVIA Linux - Newbie 3 06-30-2003 01:29 PM
Keyboard won't work to type root password Stevetgn Linux - Newbie 2 06-14-2003 05:11 AM

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

All times are GMT -5. The time now is 01:13 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