William Astle wrote:
I'm sure a lot of us have been in this situation (and, in fact, some were last night :) ). Here's a little trick for getting around a missing root password.
Assuming you have physical access to the box (or at least access to the boot loader at boot time, possibly by a serial port or something), you can get around the root password by doing the following:
Pass the following parameter to the kernel at boot time: init=/bin/bash
How you do this depends on your bootloader and is beyond the scope of this discussion.
Once you have your bash prompt, do the following:
mount -orw,remount / # this makes the root partition read/write
Now you might need to mount /usr with:
mount /usr
Now you can do:
/usr/bin/passwd # reset your password
Or you can use a text editor to remove the password from root
Now do the following:
umount /usr # if you had to mount it in the first place mount -oro,remount / # to prevent fsck-ing / when you reboot
Now reboot your box. Just use Ctrl-Alt-Del or the reset switch at this point.
If you opted for the "edit /etc/passwd and remove the root password" option, once the box reboots, set the root password.
Note that this method requires access to pass parameters to the kernel at boot time.
Thanx 4 that, William. -- --------------------------------------------------------------------- Dave Bourassa at http://members.shaw.ca/djb.enterprises/ mailto:[EMAIL PROTECTED] --------------------------------------------------------------------- "There are 10 kinds of people in the world. Those who understand binary and those who don't." ---------------------------------------------------------------------
_______________________________________________ clug-talk mailing list [EMAIL PROTECTED] http://clug.ca/mailman/listinfo/clug-talk_clug.ca Mailing List Guidelines (http://clug.ca/ml_guidelines.php) **Please remove these lines when replying

