[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3040
  • Last Modified:

Reset root password in Debian

Experts,

Looking for help on how to reset root password in Debian Sarge 3.1. Is there any restore CD to do that?

Sorry I forgot the password:)

Thanks...



0
marvelsoft
Asked:
marvelsoft
2 Solutions
 
xDamoxCommented:
Hi,

Reboot into single user mode and reset your root passwd.

http://linuxgazette.net/107/tomar.html
0
 
kblack05Commented:
Boot from debian CD choosing linux2.4 kernel (default)

Mount the root partition to /mnt (or make a tmp dir and mount it there)

Issue 'chroot /mnt' (or wherever you made the dir if you created one)

Then issue the 'passwd' command, or 'passwd root' and change the password.

You could use 'cat /etc/fstab' to determine your root partition, or since you'll not yet be chrooted, you can also *carefully* use 'fdisk /dev/hda' or 'fdisk /dev/hda1' and then press "P" for print. The /dev/hda# you are looking for will be for the root or '/' dir.

Regards,

~K Black
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now