LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 09-27-2003, 10:35 AM   #1
gemini728
Member
 
Registered: Sep 2003
Posts: 57

Rep: Reputation: 15
HELP Please


I am a Lunx newbie. My system is Redhat v9.0. Yesterday, I updated my system using the Redhat Network up2date app. Now I cannot login. I am positive I am using my correct password for root, but the system keeps giving me the message "Authentication Failed".

Any ideas? I vaguely remember hearing that there is a standalone account that can be used to bypass the standard login in cases where a user forgets his/her password. Maybe that would work? If so, can anyone tell me what that login is?

The only other alternative I can think of is to reformat the drive and start all over again. I have quite a bit of data and software downloads, as well as configuration, that I would prefer not to lose.

Thanks to anyone who can help.
 
Old 09-27-2003, 10:49 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Welcome to LQ.

Follow these steps to reset your root password:
1) Reboot your computer.
2) When the grub bootloader appears on the screen select the entry for your linux system - it may be the only one.
3) Press the "e" key to edit the entry.
4) Select the line beggining with "kernel".
5) Press the "e" key again
6) Type " single" no quotes
7) Press enter
8) Press "b" to boot
9) When the prompt appears type "passwd" press enter
10) Enter a new password when prompted
11) Reboot by typing "shutdown -r now"
 
Old 09-27-2003, 11:13 AM   #3
gemini728
Member
 
Registered: Sep 2003
Posts: 57

Original Poster
Rep: Reputation: 15
Thank you David, but I could not get the instructions to work. Here is what happens:

I follow the instructions and after I fullfill step #8, the system begins to boot and then it says "kernel panic: no init found. try passing init= option to the kernel"

I tried various combinations of passing the word "single" to the argument list, including init=single, but none worked. Is my system a lost cause?
 
Old 09-27-2003, 01:16 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
did you make sure it was a space then single?
 
Old 09-27-2003, 02:46 PM   #5
gemini728
Member
 
Registered: Sep 2003
Posts: 57

Original Poster
Rep: Reputation: 15
David, thank you for your help. Yes, you are right, I had not noticed the space before the word "single". After I entered it properly, it let me change the root password, which I did. However, when I rebooted after that, it still gave me the message "authentication failed", I know I must have done something wrong, I just wish I knew what. If you happen to think of any other ideas, I would be very grateful.

Even of you cannot help me any further, I want to thank you for all your help - you have been very friendly and extremely helpful, unlike another Linux website - justlinux.com. When I posted the identical request for help on their forum, the moderator deleted my thread because, he said, I did not follow his protocol (I used the word "Help" in the subject line - apparently this is a very serious problem on his forum.) Anyway, it is nice to have a friendly person who is more interested in providing help than the words used to request help.

Thank you, and if you can think of some other ideas, I would appreciate it very much.
 
Old 09-27-2003, 02:49 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
What packages did you upgrade?
 
Old 09-27-2003, 02:52 PM   #7
gemini728
Member
 
Registered: Sep 2003
Posts: 57

Original Poster
Rep: Reputation: 15
I ran the Up2date app and it connected to the Redhat network for the files to update. I do not recall which files were updated (there were quite a few), but I think the kernel was part of those. I also had installed some additional apps from the Linux CD - I think I added a couple of more text editors and some multimedia related apps.
 
Old 09-27-2003, 03:02 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Perhaps you could try following the procedure above until step 9 then make copies of:
/etc/passwd
/etc/shadow
/etc/group

Then create new files with just root entries:
/etc/passwd=
root:x:0:0:root:/root:/bin/bash
/etc/shadow=
root::12178:0:99999:7:::
/etc/group=
root:x:0:root

Make sure the permissions are set with:
chmod 644 /etc/shadow /etc/group /etc/passwd
chown root:root /etc/shadow /etc/group /etc/passwd

Then perform the reboot (step 11) after that login with user "root" and no password (just press enter at the prompt)
 
Old 09-27-2003, 03:09 PM   #9
gemini728
Member
 
Registered: Sep 2003
Posts: 57

Original Poster
Rep: Reputation: 15
David,

I just changed the root password again and then rather than reboot, I thought I would try loging in right from the command prompt, since I was already there. When it prompted me for the user I entered "root" and at the password prompt I entered the new password to which I had changed the system. It gave me the following message:

"Authentication service cannot retrieve authentication info"

I do not know whether this gives you a better idea of what might be wrong.

To my untrained mind it almost seems as though the password file might be corrupt (it cannot store passwords). Is there perhaps a way for me to delete and recreate the password file? Will that even help?

When I changed the password at the prompt, it said that all authentication tokens had been updated.

Thanks again.
 
Old 09-27-2003, 03:11 PM   #10
gemini728
Member
 
Registered: Sep 2003
Posts: 57

Original Poster
Rep: Reputation: 15
Sorry, looks like our posts crossed. I am about to try your latest suggestion...
 
Old 09-27-2003, 04:06 PM   #11
gemini728
Member
 
Registered: Sep 2003
Posts: 57

Original Poster
Rep: Reputation: 15
David,

I just struggled with the Linux command line and I think I deleted and created the 3 files correctly. At least they appeared there when I did an "ls" listing. First I copied the original files into an _old version. Then I used "vi" to create a new version of each file with the text you provided. Since I am still not familiar with Linux, I hope I did it correctly. Anyway, after rebooting it gave me the login prompt and I entered "root". But it never gave me a password prompt, it just went back to a login prompt.

What do you think? Did I do something wrong with the 3 files?
 
Old 09-28-2003, 07:47 AM   #12
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
When you do:
ls -l /etc/passwd /etc/shadow /etc/group

Does it show:
Code:
-rw-r--r--    1 root     root          899 Sep 27 16:30 /etc/group
-rw-r--r--    1 root     root         2645 Aug 24 11:47 /etc/passwd
-r--------    1 root     root         1840 Aug 24 11:47 /etc/shadow
If not then change the permissions to match.
 
Old 09-28-2003, 08:33 AM   #13
gemini728
Member
 
Registered: Sep 2003
Posts: 57

Original Poster
Rep: Reputation: 15
David,

The /etc/shadow did not have the permissions you showed. The other 2 files were OK. I changed the /etc/shadow to -r--------. Then I rebooted.

Now they look like this:

-rw-r--r-- 1 root root 15 Sep 27 17:00 group
-rw-r--r-- 1 root root 32 Sep 27 16:58 passwd
-r-------- 1 root root 26 Sep 27 17:22 shadow


When I get the prmopt:

52 login:

I type "root" and the same thing happens as before - no password prompt, instead it just goes right back to the login prompt.
 
Old 09-28-2003, 08:47 AM   #14
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
There should be an up2date logfile:
/var/log/up2date

Perhaps there will be a bit more information as to what has changed there.

You may want to put the password fiels back now too.
 
Old 09-28-2003, 09:38 AM   #15
gemini728
Member
 
Registered: Sep 2003
Posts: 57

Original Poster
Rep: Reputation: 15
David,

I looked at the up2date log files, but I am afraid I cannot tell much from them. I did not see anything that stands out as an obvious error.

I wish to thank you for all your help. Obviously I must have done something to the system that will not allow me to login. I doubt Redhat did anything wrong with their up2date system. Even though I could not get back in (the system appears to run just fine, it is just that I cannot login), I learned a lot from your help and trying to get back in. I have made carefull notes of everything you told me and I will keep them for future reference. I did not expect to get such a crash course on the Linux command line. Thanks again.

Incidentally, should you think of anything that might help, please let me know. I will most likely wait a couple of days and then reinstall Linux.

I hope I was not too much of a bother.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration