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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I had a power outage yesterday and the system shut down right in the middle of booting up. When the power came back on Linux would boot up, but I could not log in as root any more. somehow the password got corrupted or lost or something. It will let me log in as a user, but it won't let me change any configuration files or change the root password from there??. Is there anything I can do to repair this short of reinstalling the whole thing again??
It would be easier if we knew what distribution you are using. You can set that in the User CP.
You can try using your install CD to boot. When you get to the point where it asks if you want to install there is usually an option to rescue or repair. If this works like it did with my distribution, eventually you will get to a command line where you can chroot to your normal / and then reset your password.
With LILO or Grub, you may have the option to select "single". If you do, select it, and it will boot up into a console, with you as root. Then just type "passwd" to change it.
Otherwise, you may try booting with a linux bootable cd and mount the partition. Then you can generate the MD5 encrypted key via a console (or whatever encryption is used) and paste it into your /etc/passwd or /etc/shadow file (use the latter file if you have it) into the appropriate place.
You should have no problem with either solution. Alex has a good suggestion with going into Single user mode. You can do that by temporarily editing grub during boot up. When grub comes up use the E key to go into edit mode. You'll see the lines that make up the boot commands. Edit the line with vmlinuz in it to include a 1 right after vmlinuz (see below). Then use the B key to boot. Once the command line comes up you can change the password on root with the passwd command.
Thank you guys, that worked great and I learned something new. I was able to edit the Grub loader and boot into run level 1 and change the password. I am so greatful for this site and everyone here. Thanks again Mr. Makowski and Student 4 for you help. Jaz
Jaz, glad to hear everything worked out. In my opinion this is one of the best sites out there for getting help with linux.
aunlead, I can't give you the exact steps for lilo, but I know it is possible to do the same thing. I know the latest version of lilo is not like the one I run on my old 386. In my version all I had to do was type linux 1 when it came to the lilo prompt and it would continue into single user mode. You might check out the LILO mini-HOWTO at the linux documentation project for more help.