JuanTanamera
04-10-2001, 10:31 AM
What is the procdedure to recover lost root password ?
(besides re-installing)
(besides re-installing)
|
Click to See Complete Forum and Search --> : lost root password JuanTanamera 04-10-2001, 10:31 AM What is the procdedure to recover lost root password ? (besides re-installing) messy 04-10-2001, 10:36 AM don't think there are any alternatives demian 04-10-2001, 10:52 AM No need to reinstall!!! Get toms boot disk (here (http://www.toms.net/rb/)) which features a full linux on a floppy. Boot with that disk and mount your / partition. Then blank the password field in /etc/passwd for root (/etc/shadow if you're using shadow passwords). Reboot to your normal system and you can login as root without a password. bugfix 04-10-2001, 12:00 PM ...or boot in to single user mode. At the LILO prompt type 'linux 1' without the quotes and then use 'passwd' to change it. You can configure LILO so its not possible to do this. demian 04-10-2001, 12:06 PM Originally posted by bugfix: <STRONG>...or boot in to single user mode. At the LILO prompt type 'linux 1' without the quotes and then use 'passwd' to change it. You can configure LILO so its not possible to do this.</STRONG> I hope this doesn't work!! Any halfway secure distro should prompt you for a password even in single user mode. bugfix 04-10-2001, 12:10 PM I hope this doesn't work!! Any halfway secure distro should prompt you for a password even in single user mode. Worked for me when my dad lost his password. Although, as I said, its very easy to change it so its not possible to do it. X_console 04-10-2001, 02:58 PM You can add the following lines to /etc/lilo.conf to prevent users from booting to single user: restricted password = "whatever" So typing "linux 1" will require a password. Once this is successful, depending on how your /etc/inittab is configured, you may or may not be asked for a password when logging in as root. This is trivial though. Anyone who has physical access to your machine can crack into it with a bootdisk or through other methods (removing hard drive, etc...) Craig McPherson 04-11-2001, 08:20 AM Originally posted by bugfix: <STRONG>[b] Worked for me when my dad lost his password.</STRONG> Most distros are now requring the root password to boot into single-user mode. I haven't seen any configuration options for it, so I guess maybe it's hardwired into the init system. If your distro doesn't prompt for the password, you can do a workaround by setting a LILO password, but it's not really the same. Carp 06-17-2003, 08:19 PM How do I put that image for the TOM thing on a floppy under windows? Also, I dont know how to mount the partition or anything. Thanks. sharth 06-17-2003, 08:30 PM use rawrite viperlin 06-17-2003, 08:39 PM just for conversation my laptop is physically secure, single usermode will not really work, taking out the hdd, mounting it under another system will not work. hell the FBI would have trouble getting my files. encrypted root partition :D http://forums.gentoo.org/viewtopic.php?t=31363 karthik 06-17-2003, 10:19 PM Another way to do this is to insert a distro setup CD, which has a recovery mode in it. [redhat, mandrake have for sure AFAIK] mount the root fs and chroot to mounted partition. type `passwd` to change the root password. The root passwd of your linux installation will be reset to this new passwd. rbelt 07-04-2003, 01:52 PM Thanks karthik, worked like a charm although it makes me nervous that it was so easy -- just goes to prove if the box is physically compromised, it's toast! //RB mdwatts 07-04-2003, 02:02 PM There is also a JL Help File on recovering lost root passwords. http://justlinux.com/nhf/Troubleshooting Most distros have documentation on their site for the same. serz 07-04-2003, 03:26 PM Originally posted by X_console You can add the following lines to /etc/lilo.conf to prevent users from booting to single user: restricted password = "whatever" So typing "linux 1" will require a password. Once this is successful, depending on how your /etc/inittab is configured, you may or may not be asked for a password when logging in as root. This is trivial though. Anyone who has physical access to your machine can crack into it with a bootdisk or through other methods (removing hard drive, etc...) Didn't know about the restricted option, nice tip X_console. justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |