[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: I forgot the root password, can not maintain my machine.



Long Li wrote:

>How can I login as root now?
>

Hopefully you've set up a sudo account, in which case you can simply
"sudo passwd root" to change root's password.

If not, at the LILO prompt, enter something like:

linux init=/bin/bash

which, if security is not too tight on you system, allow you to get a
console with root privileges; edit /etc/passwd so that the line with
root's data has nothing in the second field, where an "x" is currently.
Probably. Depends on several assumptions.

Then reboot and you should be able to log in as root without a password,
and then change it.

Then realize that your system is more vulnerable than it needs to be and
fix it.

Kent




Reply to: