Question : Forgot root password

I am using suse linux 6.1. I have forgotten the root paswword. Is there anyway I can login as root? I dont' have a bootable floppy as well.

thanx.

Answer : Forgot root password

> I dont' have a bootable floppy as well.

You can use the boot disk that came with SuSE package -- if it is lost or damaged there is an image of it on the first CD (under /disks/ called either bootdisk or eide1, if I recall that right). You can create the boot disk from the image under DOS with rawrite.exe (int /dosutils/rawrite/), all you need is a formatted diskette. If you have a bootable CDROM drive you can boot from the CD.

Just start the installation normally, as soon as yast is started you can switch to a console with a shell.

  - create an empty directory, e.g. /foo
  - mount your boot partition into /foo
  - remove the encrypted password from /foo/etc/shadow
  - sync disks and unmount /foo
  - reboot your box
  - login as root (no password) required
  - give a new password and remember it this time ;-)

One note: the only editor that may be available could be vi:

  - /foo/bin/vi /foo/etc/shadow
  - move the cursor to the start of the encrypted password
  - press the 'x' key to delete characters up to the next ':' (don't delete the colon)
  - enter ':wq' RETURN (without the quotes).
  - to exit vi without making changes enter ESC ':q!' RETURN

Hope it helps
 
 
Random Solutions  
 
programming4us programming4us