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.
If you boot into "single user" mode (not known as simply "single") then it automatically puts you at a root prompt.
In the initial boot screen where it shows you a list of boot choices and says to press any key within 5 seconds just hit enter. Choose the kernel you want to boot and hit "e" then go to the end of line and put a "1" and exit back to the previous screen. Choose "b" to boot and it will boot your kernel into single user mode. Once it is booted in single user you should be able to change the root password by typing "passwd root" (or simply "passwd" since you're already root).
If it complains about not being able to write to the file then / (root) is mounted readonly and you can remount it as read write with: "mount -o remount,rw /"
P.S. Please do not put "URGENT", "IMPORTANT", "ASAP" or similar words in your titles. No one here is being paid to help you - it is all voluntary. Some users will ignore posts with such words in the title as it is considered rude.
Does root not work on the console or in a terminal session or both?
When you run "passwd root" in single user what output do you see?
In single user you might want to verify /etc/passwd and /etc/shadow files are not corrupted. I'm guessing it isn't too bad given that you can login as a normal user. Sometimes what happens is there is a corruption a file such that entries above it work but entries below it don't. The root user should be first entry in both those files.
Did you make any changes to PAM configs? If so that could bork things up.
What is in your /etc/securetty file - this file restricts which terminals (and console) are allowed to login as root.
root login to the gui is not supposed to work
root login to the TEXT only console should work
also you can not use the CAP spelling "SU" will not work Linux is capitalization sensitive
it is lowercase su
but root access will ALSO reguire the full root access an that will require this
In answer to the first question, "root" login via my "new" pw doesn't work in either terminal or console! (in terminal I'm logged on as a "regular' user (to Centos) and am trying to "su" to root (no caps, all lower case!)
What is conusing now is you are talking about looking at files....and I don't know how to do that before full boot (again, to Centos)......and, of course, as "su" to root doesn't work....can't get to them then, either!
When I was talking about looking at files I meant after you booted into single user and got a root prompt. From what you'd written previously I thought you were able to do that. Is that not the case?
Once you boot into single user you can mount your other filesystems manually using the mount command but the files I was talking about are generally in /etc so are part of the root filesystem which is already mounted.
You didn't answer my question about EXACTLY what you saw when you typed "passwd root". You seem to be assuming it worked but I'm not willing to assume that given that you can't login after you do a normal reboot. Do NOT select what you like out of responses to your post - actually respond to all of it. Not doing so is likely to give folks a disincentive to help you further. There can be various reasons why it didn't work or why it did and something else is going on. Troubleshooting is about eliminating possibilities and so far you've not posted anything to let us eliminate the possibility your passwd command failed or that you were actually in single user.
When you get to single user type "who -r" and post the results. Then type "passwd root" and post the results.