Lost Root Password

I have recently become the sys adm guy for our unix systems here for my shop. I have a pretty good understanding of the system, but there is just some stuff that I don't know. Right now one of those things is to recover the password for a unix system.

I know that there is a way that you can use the cd to boot up and delete the passwd from the /etc/passwd file. Could someone please help me to do this??? Thanks

Chris

Please use the search function. This question comes up a lot.

As you search, put your OS in the search string. It's different for each OS.

generally i believe if you delete the password for root in /etc/passwd you will be asked for a new password upon next reboot. this is the case correct? (luckily ive never lost my password :))

but you cant do that with the OS that is on there if you dont already have the root password.

so, you have a few ways to do it. your goal is to mount that file system and change the /etc/passwd file.

first thing, you can rip out that harddrive and put it in another computer with an os on it already, so you can then mount that harddrive and edit accordingly. that however is a pain in the ass.

so, the easiet thing to do would be to boot from some cd and use that to mount that drive and edit the file.

your install cd is its OWN os. if you boot from that disk, look for an option to get to a command line. once you have a command line you are set. mount that drive, browse to
/etc/passwd and fix your computer!

as perderabo said, search, youll still find more info than what i have provided.