LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 03-06-2005, 04:47 PM   #1
mclieu
LQ Newbie
 
Registered: Mar 2005
Posts: 7

Rep: Reputation: 0
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

Help? Ideas? Please?


(wow, that was hip)

Last edited by mclieu; 03-06-2005 at 04:49 PM.
 
Old 03-06-2005, 05:49 PM   #2
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
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
 
Old 03-06-2005, 06:45 PM   #3
mclieu
LQ Newbie
 
Registered: Mar 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Great idea, unfortunately, no dice. Got any other ideas?
 
Old 03-06-2005, 09:27 PM   #4
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
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.
 
Old 03-06-2005, 09:41 PM   #5
mclieu
LQ Newbie
 
Registered: Mar 2005
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
Old 03-06-2005, 10:58 PM   #6
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
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.
 
Old 03-07-2005, 12:09 AM   #7
mclieu
LQ Newbie
 
Registered: Mar 2005
Posts: 7

Original Poster
Rep: Reputation: 0
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

Last edited by mclieu; 03-07-2005 at 12:10 AM.
 
Old 03-07-2005, 03:57 AM   #8
lihmin
LQ Newbie
 
Registered: Sep 2003
Location: Singapore
Posts: 23

Rep: Reputation: 15
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.
 
Old 03-07-2005, 08:18 AM   #9
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
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.
 
Old 03-07-2005, 10:15 AM   #10
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
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.
 
Old 03-07-2005, 12:30 PM   #11
mclieu
LQ Newbie
 
Registered: Mar 2005
Posts: 7

Original Poster
Rep: Reputation: 0
"/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.

Last edited by mclieu; 03-07-2005 at 12:51 PM.
 
Old 03-07-2005, 12:35 PM   #12
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
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"
 
Old 03-07-2005, 02:18 PM   #13
mclieu
LQ Newbie
 
Registered: Mar 2005
Posts: 7

Original Poster
Rep: Reputation: 0
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."?
 
Old 03-07-2005, 02:54 PM   #14
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
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.
 
Old 03-07-2005, 04:27 PM   #15
mclieu
LQ Newbie
 
Registered: Mar 2005
Posts: 7

Original Poster
Rep: Reputation: 0
huh, thanks folks.

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


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBsd: login shell troubles KneeLess *BSD 2 06-03-2004 07:59 PM
Login Troubles Risc91 Red Hat 2 09-25-2003 06:35 AM
Newbie in troubles CleonII Linux - General 3 05-15-2003 07:22 AM
login troubles bandofmercy Linux - General 3 04-09-2003 08:27 PM
PhatLinux Login Troubles superRoy Linux - Newbie 4 01-16-2002 09:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:26 PM.

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