LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   root password doesn't work (https://www.linuxquestions.org/questions/linux-newbie-8/root-password-doesnt-work-313746/)

SlowMindThinkin 04-15-2005 11:02 PM

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.)

Kdr Kane 04-15-2005 11:53 PM

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.

masand 04-15-2005 11:54 PM

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

makuyl 04-16-2005 03:27 AM

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.

SlowMindThinkin 04-17-2005 03:36 PM

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"?!)

masand 04-17-2005 03:51 PM

u should have looked for
" restore root password"

to get good results

regards

SlowMindThinkin 04-17-2005 04:48 PM

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?

wmakowski 04-17-2005 09:39 PM

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

SlowMindThinkin 04-17-2005 10:12 PM

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).

masand 04-17-2005 11:19 PM

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


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