LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Newbie with login troubles (https://www.linuxquestions.org/questions/fedora-35/newbie-with-login-troubles-298447/)

mclieu 03-06-2005 04:47 PM

Newbie with login troubles
 
Hey guys, newbie with some login troubles here. First things first -

Hardware:
eMachines minitower
600mHz Celeron Processor
256mb SDRAM
20gb HDD (Maxtor)
120 watt PS

OS:
Fedora Core 3
Graphics mode

Now, to the problem: I'm having trouble logging in as either root or my personnal user name. When attempting to login as root, I get the "incorrect user or password" message on my next login prompt. When attempting to login as my other user, I get a popup with an "Authentication Failed" message.

In an attempt to rule out the possibility that my root password is incorrect, I have used Knoppix to change my root password (by way of terminal). This approach has been undertaken several times, with a possitive password change message each time followed by a negative response when attempting to login. I think I've run out of ideas, and thus I throw myself to the mercy of this community :D

Help? Ideas? Please?


(wow, that was hip)

mjrich 03-06-2005 05:49 PM

You may have the wrong keyboard layout enabled.

Try typing your password into the login entry box, and check that it's coming up as expected (with no unexpected European symbols etc. :) )

Cheers,

mj

mclieu 03-06-2005 06:45 PM

Great idea, unfortunately, no dice. Got any other ideas?

benjithegreat98 03-06-2005 09:27 PM

How did you edit change your Fedora password in Knoppix? Did you directly edit the /etc/shadow file? If not then you probably didn't change the password at all. If I were in your shoes then I would use Knoppix to edit /etc/shadow and blank out the password completely. Then when you log into Fedora just hit enter for the password then changed it after you log in.

mclieu 03-06-2005 09:41 PM

Quote:

Originally posted by benjithegreat98
...use Knoppix to edit /etc/shadow and blank out the password completely.
Could you explain the actual sequence of commands for doing that? Sorry, kinda new to this system :)

benjithegreat98 03-06-2005 10:58 PM

Sure. I'll have to be a bit vague in some spots so it might involve some research on your behalf.

I haven't used Knoppix in a while. You need to boot into knoppix and you need to figure out how to mount the partition that had FC3 on it. Let's say you get the partition mounted on /mnt/hda1 . You now need to edit the file /mnt/hda1/etc/shadow . You need to find the line that begins with "root". Should be the first line. It currently says "root:" then has a bunch of random character and then another colon. You need to make it say "root::" then leave whatever used to be on the end of that.
So for example mine would say "root::12756:0:99999:7:::"


Before you edit anything make a backup. if you are in /mnt/hda1/etc/ then type "cp shadow shadow.bak" to make a backup.

Also before you edit it you will probably have to change the permisions to do this type (while in /mnt/hda1/etc) "chmod 600 shadow" . When you are done editing the file type "chmod 400 shadow" . That will make it read-only again.

Also before you do anything try typing in your password w/ caps lock on. If you use the number pad to type in your password try it with the num lock on and off

If I was too vague on anything just ask and me or somebody else will clarify.

mclieu 03-07-2005 12:09 AM

etc is not showing up on hda1, is this a permissions issue?
(I'm guessing its installed on hda1, since hda0 apparently doesn't exist and hda2 is the wrong fs type)


Thanks, btw, very helpful :)

lihmin 03-07-2005 03:57 AM

maybe etc is not in hda1
try fdisk -l /dev/hda to see all partitions of hda. then mount them one by one (except Extended,swap & yr Windows)& look for shadow file.

benjithegreat98 03-07-2005 08:18 AM

Yes, in fact if you copy and paste the out put of that to here we can help you decide which one that is. When you have Knoppix booted up you need to open a terminal. You need to gain root access on the command line and then type in
Code:

/sbin/fdisk -l /dev/hda
If you post that up we can give you some more specific instructions.

benjithegreat98 03-07-2005 10:15 AM

I just had a thought on this. You don't need knoppix to do this at all.

First print out the above instuctions because you will only have a command line

Reboot your computer

When GRUB is starting up hit an arrow key to stop the timer. When the cursor is on top of Fedora hit the 'a' key. This will allow you to edit the kernel arguements.

At the end of the line you are editing type the word ' single' (no quotes) and hit enter. This will give you a command line with root access. You can edit the /etc/shadow file as written above. instead of the path being /mnt/hda1/etc/shadow it will simply be /etc/shadow . When you are completely finished type "reboot".

Hope this simplifies it a bit. It just occured to me you could do that when I was working on one of my own problems at work.

After you successfully log in change your root password to something beside a blank password because that is dangerous to have. You can also blank out your personal user password too and change that when you boot back up.

mclieu 03-07-2005 12:30 PM

"/etc/shadow permission denied"

Going to try the knoppix method next

EDIT:

fdisk -l yielded the following:

Device boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 2481 19824210 8e Linux LVM

couldn't find etc directory under either disk.

benjithegreat98 03-07-2005 12:35 PM

Remember before you edit the file you have to change the permisions to make it Read-write with "chmod 600 /etc/shadow" and when you are done change it back with "chmod 400 /etc/shadow"

mclieu 03-07-2005 02:18 PM

Ok, so the good news is I managed to edit the file and then save it, with the additional :

The bad news is that it still won't let me log in as root

I have a feeling I'm doing something simple stupid; the login is just "root", right? Not "root@localhost" or "Root" or "root."?

benjithegreat98 03-07-2005 02:54 PM

Wow.....
Assuming you did that correctly, it should just work..... I even did it on my system before I wrote that to you so I wouldn't give you miss-information and it worked as expected. I would almost have to say you need to try and re-install linux. Sounds like something is corrupted. I would re-burn the CDs too just to make sure there is not something wrong w/ them. I could think of a few more ways to try and diagnose this, but in my opinion it would be easier for you to just re-install. Especially if there truely is some sort of corruption. You should run the md5sum on the .iso files that you downloaded to make sure they are good and burn at a slower speed.

And yes, it is just root as the login name.

Sucks that didn't work out. Good luck.

mclieu 03-07-2005 04:27 PM

huh, thanks folks.

Gonna go download again and reburn, and hopefully have this system up and running before the end of the week :)


All times are GMT -5. The time now is 11:49 AM.