Linux [Electronic resources]

Janet Valade

نسخه متنی -صفحه : 357/ 110
نمايش فراداده

Forgotten Root Password

Forgetting your root password is not an insurmountable problem. You can enter a new root password by booting your computer in single user mode. This is a special mode of operation, used mainly by system administrators for specific tasks. You can use this mode to recover from a lost root password.Figure 4-18. Notice that it includes some directions: 'e' to edit the command before booting. To enter single-user mode:

1.

While the boot loader screen displays, press <e>. The contents of a configuration file are displayed, similar to the following example.

2.

Use the arrow keys to move to the kernel line.

3.

Press <e> to edit the line.

4.

Add the word single to the end of the line, as follows, and then press <Enter> to save the change:

5.

Press <b> to boot.

In Mandrake, you can enter single user mode by choosing Failsafe at the boot loader. For other distributions, read the documentation. If you use LILO instead of GRUB, type linux single at the boot prompt.

When your system finishes booting, it displays a prompt. If it asks for a login, enter root. At this point, you can change your root password. Type:

passwd root

Enter the new password twice when prompted. Then type:

reboot

to reboot your computer in its normal modemulti-user mode.