Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Boot into rescue mode (use cd1 of the install discs)
Mount the disk.
Mount your Linux disk to mountpoint, for example /mnt
mount /mnt /dev/hdXx
Now you can go to the mounted disk
Use vi, vim, or nano to edit the files
What your need to edit
Try now to edit your file /etc/passwd by vi or sed. But, attention!
Your file /etc/password is in fact /mnt/etc/passwd. You need to edit
the line contains the word "root". For example, if your /etc/passwd
contains the line
edit it and blank out the password field to the next:
You should be able to login as root and you needn't any password for root.
After that, don't forget to change your root password to new one.
Yes. If you want, you can disable the "boot from CD" option in the BIOS, then password-protect the BIOS settings, but even that can be overcome with enough effort. Such heroic measures are really unnecessary in most cases.
It's like securing your house; a good deadbolt or rimlock on the door combined with other standard security measures will usually suffice to keep the undesirables out, or you can go nuts and install multiple locks on the doors and bars on the windows in an effort to keep out a few more.
Either way, a really determined person can still get in by driving a car through your wall.