[clug-talk] Reset root password SuSE 9.2
curtis at enigma-logic.ca
Sat Sep 10 06:40:15 PDT 2005
On Saturday 10 September 2005 01:17, Eric Mei wrote:
> Jarrod Major wrote:
> >Hey Gang,
> >I've been beating my head against a wall here for hours. I have a server
> > that I haven't yet put into production (it's only been on my local
> > network) and I haven't touched it for months. When i went to login, it
> > appears that I have forgotten my root and user passwords. Nothing I enter
> > works anyway. I usually write these things down, must've slipped my mind
> > this time.
> >I have the original install media so I did a Google search and the easiest
> > way appears to fire in Disc 1 and select Rescue system from the boot
> > menu. They talk about editing the /etc/passwd and /etc/shadow files. I
> > have done this and when I reboot, I still can't get in as root.
> > Effectively, they suggest you clear out the root password so that when
> > you reboot, there is no password, you are supposed to just hit enter.
> > When I hit enter at the root login prompt I get "Login incorrect".
> >I tried Tom's Root Boot disc but unfortunately it doesn't support the
> > Reiser FS and my / partition (where /etc lives, no d'uh!) is Reiser.
> >I have a Knoppix disc but I didn't make it and for whatever reason this
> >particular system doesn't want to boot from this CD (the SuSE 9.2 disc one
> > is also burned and boots fine). I didn't want to do a big ISO download
> > for the latest Knoppix, this one isn't that old... 3.4
> >So I am running out of options here. There was other advice to physically
> >remove the drive and install it in a working system and once mounted edit
> > the same files. I don't want to resort to this and it almost seems like
> > they are getting reset somehow. Is Reiser doing this? Is this a funky
> > SuSE thing? I read docs right off the SuSE site regarding the rescue
> > procedure so I am confident they are supposed to be right.
> >This is a basic install, no GUI, just the OS and Apache and a few other
> >I'm not having much luck with root passwords these days. First my laptop
> > and now this (I haven't tried my user password for root in Kubuntu Neil,
> > I will).
> >Going to bed, gonna try this again tomorrow. TIA!
> Does your boot loader (grub/lilo) has passwd protection too? if no, the
> easiest way is booting into single mode and reset root password. That is
> adding a option "single" on the boot prompt of grub/lilo, then boot will
> bring you in a single mode shell with root permission. simply run
> "passwd" to change it.
> hope I didn't misunderstand you.
passing 'single' to GRUB takes you to an sulogin prompt on SuSE, which brings
you back to the original problem.
With other distros, booting single will let you fix things up nicely, but not
SuSE. Instead, you need to get off the bus sooner than 'single', so just
set up a shell by passing 'init=/bin/bash' to GRUB instead. You'll end up at
a root prompt where you can reset the password:
# mount -o ro,remount /
kill the power and boot up normally.
More information about the clug-talk