LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   lost root´s password on SuSE 9.0 (https://www.linuxquestions.org/questions/linux-networking-3/lost-root%B4s-password-on-suse-9-0-a-259371/)

Adrian13 11-25-2004 10:05 PM

lost root´s password on SuSE 9.0
 
confused: Hi, hope you can help me, i lost the root´s password, what can i do?

thanks

bru 11-25-2004 10:19 PM

If you can boot up into single user mode. this will auto log you into the root account, then you can

passwd

and then change the password

sigsegv 11-25-2004 10:20 PM

At the lilo (or grub or whatever) prompt, add a 1 to the end of the kernel arguments and boot as normal. This will throw you into singel user mode. Some distros require the root password to enter init 1 though (as they should).

Failing that, get the ISO for a "run from the CD Linux" and mount up your root filesystem. Edit /etc/shadow and remove the string of text between the first two colons. Example:

Code:

root:$1$XoDoJk95$abDO$$/mBTgSVu4hi.:0:0::0:0:Charlie &:/root:/bin/csh
    ^    Remove This Part          ^

then reboot and change root's password to anything you like.

Note: the above is from a DragonFly machine, and Linux differs slightly, but it's the same basic operation.

HTH

perfect_circle 11-25-2004 10:26 PM

Quote:

Failing that, get the ISO for a "run from the CD Linux" and mount up your root filesystem. Edit /etc/shadow and remove the string of text between the first two colons. Example:

code:

root:$1$XoDoJk95$abDO$$/mBTgSVu4hi.:0:0::0:0:Charlie &:/root:/bin/csh
^ Remove This Part ^



then reboot and change root's password to anything you like.

Note: the above is from a DragonFly machine, and Linux differs slightly, but it's the same basic operation.
Instead of removing that, it would be safer if you replace it with one of the users part and use user's password to login as root.

sigsegv 11-25-2004 10:38 PM

Quote:

Originally posted by perfect_circle
Instead of removing that, it would be safer if you replace it with one of the users part and use user's password to login as root.
The poster can't log in as root as it is. If you're down to hand editing shadow, it's not really possible to make the situation with the root account any worse. :D

perfect_circle 11-25-2004 11:01 PM

that's not true.
I can think of a worse situation.
deleting the shadow file:D

sigsegv 11-26-2004 01:01 AM

Quote:

Originally posted by perfect_circle
that's not true.
I can think of a worse situation.
deleting the shadow file:D

That would indeed do it, but if you delete the file by editing it, you shouldn't have been there in the first place.

My point was that if you're playing about in shadow, adding a the password field from another account isn't any safer than just deleting the offending password field all together.

Sridhar Kumar K 11-26-2004 01:37 AM

quote:
-------------------------------------------------------------------------------------------------------
get the ISO for a "run from the CD Linux" and mount up your root filesystem.
-------------------------------------------------------------------------------------------------------

Iam a newbie. I didn't get this point. Can some one explain what this means. Will this work for any Distr. of Linux or only for SuSE.

Thanks,
Sridhar.

perfect_circle 11-26-2004 02:43 AM

in any distro, i think the cd gives you an option to boot in rescue mode.
it runs a small linux version in the memory and mounts your actual root partition (/) under something
like /mnt/sysimage. This way it gives you the opportunity to access your partitions and fix whatever problem you may have

blubbfish 11-26-2004 06:40 AM

if you boot from your first suse 9.x cd you have to choose manual installation in the following dialog boxes you can choose what you like to boot and here you can tell him to boot a rescue system --> thats the way you want to go .... voila you have your rescue system now mount the root partition and do as described before ;_)

Adrian13 11-26-2004 09:52 PM

root´s password recovery didn't work
 
hi people, sorry as you may have noticed i´m kind of new at this
as to the info you sent, it did't work or i probably couldnt make it work
(the problem is i lost the roots password on SuSE 9.0)

a little fisher price help will be appreciated
thanks

rabeea 11-27-2004 12:44 AM

hi All,

leave this booting from cd idea

Even u can go to single mode using ur OS.

For Lilo: Boot into ur linux text mode using CTrl+x and write "linux single" command and when u get teh prompt enter passwd command

rabeea 11-27-2004 12:46 AM

For Grub:
On boot screen selecting linux press 'e' tp eidt that boot
then again press 'e' and write 'linux single' or 'init 1' and then press 'b'.It will take u to shell and enter passwd command .Rest ur root password.

thnx

sigsegv 11-27-2004 01:06 AM

rabeea -- Your instructions just repeat what's already been said, and in that spirit, I'll repeat myself. :rolleyes:

What you propose will only be of use if the system doesn't require root's password for single user access. If it does, then you're no better off than you started ... not to mention, your instructions by themselves have a low [read: next to nill] chance of working. Very few distros use "linux" for the kernel image name anymore.

Having said that ...

Adrian13 -- here's a page that describes the correct way to boot into single user mode from grub.

Here's one page that describes resetting the root password, and here's another.

Not sure if they qualify for "Fisher Price" help or not, but they're more verbose than I. Try them out. :)


All times are GMT -5. The time now is 05:51 AM.