Re: Lost root access :-(
On Tue, 27 Jun 2000, Frank van der Hulst wrote:
> Is there a way to login as root, and specify the shell to run?
Very easy if you have physical access to the machine:
Reboot, hold the Shift key while LILO is booting, enter the default
booting image name (e.g. Linux) and append
init=/bin/bash
as booting parameter on the LILO command line. Then wait until Linux
is up: If necessary, mount /usr partition and remount the root partition
as writable:
mount /usr
mount -o remount -w /
Edit /etc/password with your favourite editor and save it. After that, you
have to make sure that the file is written back to the harddisk. Finally,
reboot:
sync
mount -o remount -r /
umount /usr
reboot
Frank
--
Frank Mehnert
## Dept. of Computer Science, Dresden University of Technology, Germany ##
## E-Mail: fm3@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/~fm3 ##
Reply to: