You are not logged in.

#1 2013-04-18 07:14:02

yuan_sh
Member
Registered: 2013-04-18
Posts: 10

[SOLVED] archlinux can't login

The system was fine before.

WHAT I HAVE DONE:

Last night, when I turned on the computer, the boot process was interrupted with the information similar to:
/dev/sda3: UNEXPECTED INCONSISTENCY: RUN fsck MANNUALLY
...

Then I ran 'fsck /dev/sda3', and then it stuck somewhere, so I turned off power and restarted the system.


WHAT IT LOOKS NOW:

After starting the system, I am prompt to input "localhost login" and "password". But my usrnames and passwords, which were correct, are not valid anymore.

If switch to single user mode, the system went into rescue mode, where  I can type the root password (valid here) for maintenance.


So what can I do to login?

Last edited by yuan_sh (2013-04-22 10:45:33)

Offline

#2 2013-04-18 07:19:53

ubunchu
Member
Registered: 2012-05-01
Posts: 175

Re: [SOLVED] archlinux can't login

I think you gotta use "root" to log in and do maintenance.
Otherwise you could try to boot another live-cd and run fsck on /dev/sdx3


Don't forget to mark as [SOLVED].

Offline

#3 2013-04-18 07:28:20

yuan_sh
Member
Registered: 2013-04-18
Posts: 10

Re: [SOLVED] archlinux can't login

ubunchu wrote:

I think you gotta use "root" to log in and do maintenance.
Otherwise you could try to boot another live-cd and run fsck on /dev/sdx3

I tried googling but didn't find a solution to do the right maintenance...

Offline

#4 2013-04-18 07:33:08

ubunchu
Member
Registered: 2012-05-01
Posts: 175

Re: [SOLVED] archlinux can't login

You should boot a live-cd / live-usb and try to mount that partition. You will get more info, and then you could fsck the partition. And when that's cool, you can chroot and check the system log or do maintenance.
Good luck.


Don't forget to mark as [SOLVED].

Offline

#5 2013-04-21 06:05:14

yuan_sh
Member
Registered: 2013-04-18
Posts: 10

Re: [SOLVED] archlinux can't login

The sysptoms of my system was presented in my last thread
https://bbs.archlinux.org/viewtopic.php?id=161702
The problem, however, hasn't been solved yet.

But I noticed a new difference which I thought might help a little. When the system was good, the prompt for user name was

 [computer name] login: 

But now it looks like

 localhost login: 

Can we infer some useful information from this difference?

Offline

#6 2013-04-21 06:09:59

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] archlinux can't login

Reading your other thread, it would seem that some critical files in /etc must have been damaged (/etc/shadow is where your hashed password is stored).

Boot using a live cd (or if you can still get root access with rescue mode), and use the passwd utility to "change" the password of your user to what it was before.  This will rehash the password and write it (hoepfully) correctly into that file.

Offline

#7 2013-04-21 06:18:36

yuan_sh
Member
Registered: 2013-04-18
Posts: 10

Re: [SOLVED] archlinux can't login

WonderWoofy wrote:

Reading your other thread, it would seem that some critical files in /etc must have been damaged (/etc/shadow is where your hashed password is stored).

Boot using a live cd (or if you can still get root access with rescue mode), and use the passwd utility to "change" the password of your user to what it was before.  This will rehash the password and write it (hoepfully) correctly into that file.

I tried this but it didn't work. If I delete the password filed in /etc/shadow, then after I input the username, the system says "login incorrect", without a prompt for password.

Offline

#8 2013-04-21 06:37:09

yuan_sh
Member
Registered: 2013-04-18
Posts: 10

Re: [SOLVED] archlinux can't login

I just found that the prompt change was caused by missing /etc/hostname. After I reset the hostname, it looked like before.

I agree with WooderWoofy that some critical files were damaged, but still don't have any idea what are they. Or is there any way to recover? I really don't want to reinstall the whole system...

Offline

#9 2013-04-21 07:15:13

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] archlinux can't login

You know if you delete the password field in /etc/shadow, it is not like windows, where it will let you log in without a password.  If you want passwordless login, you need to use a special hash that represents a blank field.  I have done this before and it is not too hard, but I don't think it is what you are loking for.

So you tried:

# passwd yuan_sh 

???

Offline

#10 2013-04-21 07:22:31

yuan_sh
Member
Registered: 2013-04-18
Posts: 10

Re: [SOLVED] archlinux can't login

@WonderWoofy: Yes, I also tried to reset the password and even create a new user accout, but both failed to login.

Offline

#11 2013-04-21 10:54:46

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: [SOLVED] archlinux can't login

Are you able to login through a login manager like gdm, lxdm?


LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

Offline

#12 2013-04-21 12:32:57

yuan_sh
Member
Registered: 2013-04-18
Posts: 10

Re: [SOLVED] archlinux can't login

@hadrons123: I didn't try that because no login manager was installed. Finally I gave up trying to fix it and reinstalled the system ... Thank you.

Offline

#13 2013-04-21 12:54:59

oliver
Member
Registered: 2007-12-12
Posts: 404

Re: [SOLVED] archlinux can't login

I realise you fixed it, but don't forget that if you mount your real root partition (on, let's say /mnt) then the file you need to edit is /mnt/etc/shadow and not /etc/shadow. 

It may just be the way I'm reading post #3 though

Offline

#14 2013-04-21 13:12:02

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [SOLVED] archlinux can't login

A couple points, yuan_sh:

1) If you haven't found a solution in one thread, don't bother opening another.

2) If you actually make effort to solve the problem, please let people know.

3) Once you've found a "solution," mark your thread as solved.

Thank you.

Offline

#15 2013-04-21 13:12:41

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: [SOLVED] archlinux can't login

A couple points, yuan_sh:

1) If you haven't found a solution in one thread, don't bother opening another.

2) If you actually make effort to solve the problem, please let people know.

3) Once you've found a "solution," mark your thread as [Solved].

Thank you.

Offline

#16 2013-04-21 15:38:29

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,280

Re: [SOLVED] archlinux can't login

Moderator: Why, on Earth, did you start a new thread on the exact same topic?  Merged the threads.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#17 2013-04-21 15:42:01

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: [SOLVED] archlinux can't login

yuan_sh wrote:

@hadrons123: I didn't try that because no login manager was installed. Finally I gave up trying to fix it and reinstalled the system ... Thank you.

Reinstallation should be the last resort, becoz if you don't identify the issue you might end up at the same spot again.


LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

Offline

#18 2013-04-22 10:49:44

yuan_sh
Member
Registered: 2013-04-18
Posts: 10

Re: [SOLVED] archlinux can't login

@hadrons123: I can't agree more. But I don't have an extra computer, and I need to work on other tasks.....:(

Offline

#19 2013-04-22 12:03:24

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: [SOLVED] archlinux can't login

Is your issue resolved?


LENOVO Y 580 IVYBRIDGE 660M NVIDIA
Unix is user-friendly. It just isn't promiscuous about which users it's friendly with. - Steven King

Offline

Board footer

Powered by FluxBB