openengine

Derailed in Uncle Gates' Victory Garden.




Resetting root password in SUSE 10.0: A lesson for the foolish


E-mail this post



Remember me (?)



All personal information that you provide here will be governed by the Privacy Policy of Blogger.com. More...



For the last couple of months, I've been performing an experiment involving my parents and linux. I wanted to test if the distros had moved on far enough to allow people who are not just lacking in confidence with PC's but damned right scared of them. So Mum and Dads old PC exploded and I decided to see how they would fair.

I opted for SUSE linux because it was the most friendly, and in their defence they have been fairing very well, considering it is all completely new.

I however have failed less well. Needless to say, in some manner I lost the root password of their system. So installing a printer last weekend suddenly became quite a big headache.

I wrote up this entry to save anyone who may befall my fate in the future. NB You still need to know a password on the system, just a normal user will do.

To reset the root password in SUSE 10.0:

- Boot to the SUSE skin on grub (the boot screen)
- Press F2 for more options
(it then gives you the option to enter in custom kernel options)
- type "init=/bin/bash" into the text box.
- then press enter

This will boot you to a very low boot level (below init 1). You won't even have your hard disk mounted.

- mount the hard disk by creating a dir in /mnt/ to mount it too, ex hddrive (cd /mnt; mkdir hddrive)
- mount command I used was:
mount -o rw /dev/hda3 /mnt/hddrive

- then vi or pico into the /etc/shadow file
- Copy the value of the password hash of the user that you know the password over the password hash of the root user, this should be in the 2nd or 3rd colon separated column. see below starting 6

chris:1:671jkdhaksudh8391723982312hjkasdasd: ....


- there are quite a few columns after this, leave these intact.
- then reboot
- You should be able to login as root with your known password.

WARNING: SUSE doesn't allow the root password to have a null set, if you try removing the entire password you will get wierd results.

I hope this knowledge helps someone save the 4-5 hours it took me.







0 Responses to “Resetting root password in SUSE 10.0: A lesson for the foolish”

Leave a Reply

      Convert to boldConvert to italicConvert to link

 


About me

  • I'm Chris Stevenson
  • From London

Previous posts

Archives

Links


ATOM 0.3