Re: I forgot the root password, can not maintain my machine.
Bob Proulx wrote:
I just read another source on this; it said to not edit /etc/passwd if
you're using shadow passwords (if there's an "x" in the second field of
/etc/passwd). In stead, you should edit /etc/shadow and blank out the
second field in that file. Now that I remember the one time that I had
to do this several years ago, that sounds right.
Long Li <firstname.lastname@example.org> [2002-08-03 13:04:21 +0800]:
After I enter linux init=/bin/bash after lilo, I got a
console like this:
Great! You are almost there.
But when I edit the file /etc/passwd, systme told me:
init-2.03# ed /etc/passwd
Read-only file system.
So I can not modify that file. How can edit that
Normally at boot time the filesystem is mounted readonly just before
doing a file system check. If that passes as it will normally then
the system is remounted in a read-write state. You need to mount it
in a read-write state. I think you can just run:
mount -n -o remount,rw /
That will mount it readwrite and you will be able to edit the password