Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
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.
I forgot the root password of my system. I cannot think of reinstalling it. I have a lot of data in it. I dont have a DVD writer. So i cannot write the whole data. Is there any way to get my root password back. I am using a debian based system. please help...
You can also try to boot in single user mode. Some systems do not ask for password. At the boot prompt just type "linux single" or "linux 1" depending of the boot loader installed.
1. Boot up in rescue mode from your installation cd, or a boot floppy
2. Mount the / partition of your hdd
3. Backup, then edit the <mountpoint>/etc/passwd file. You need to delete all characters (probably just an "x") between the first and second ":" characters on the line starting with "root" in that file
4. Reboot, and you should be able to login as root without any password
5. Specify a new password for root
You can also try to boot in single user mode. Some systems do not ask for password. At the boot prompt just type "linux single" or "linux 1" depending of the boot loader installed.
my boot loader is GRUB.
where can i enter the cammand you just said...
And now you have all the tools to really screw around with a system that is not yours.
For the future, write the root password next to the machine. Especially if you are the only one using this computer. Better that than to screw around with the permissions of root on your system.
my boot loader is GRUB.
where can i enter the cammand you just said...
When GRUB comes up with the menu, you hit any key to put it in command-line mode. Then you have the option of editing the boot commands. I actually think that you simply add "single" to the kernel line.
but, booting from the install disk or from any "live CD" disk is the surefire way to get back into your system.
"my boot loader is GRUB.
where can i enter the cammand you just said..."
On the grub boot options prompt.
But, if your system is SuSE, then it will not work, as SuSE will not allow you to login into single user mode without a valid root password.
It is better to find a cd you can boot up from. Any installation cd, live cd or even a single-floppy linux like tomsrtbt might do that gives you a command prompt; and then edit your passwd file on your hdd as I described above.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.