LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-24-2010, 03:37 AM   #1
genogebot
Member
 
Registered: Jun 2010
Location: Brisbane, Australia
Distribution: Xubuntu 16.04.1 / Linux Mint 18 XFCE / Linux Mint 18 Mate / Ubuntu Server 16.04.1 / Lubuntu 16.04.1
Posts: 136

Rep: Reputation: 18
Exclamation Hard lockup, reboot - now I can't log in as user, but can as root


The subject heading pretty much says it all.

I had a hard lockup on my Mint 9 system and had to hit the 'reset' button. When the computer rebooted and got to the normal login screen, I couldn't log in. There is no 'authentication failed' message - the login screen disappears for a few seconds and then returns. I tried using all the desktop options: Gnome, Failsafe Gnome, and xterm, with the same result each time. (I tried deliberately entering an incorrect password as a test, and the 'authentication failed' message did pop up)

Then I tried entering 'root' as the user name with my password, and I logged in as root. (Is it supposed to do that?) That gave me a chance to check for any obvious problems, but I couldn't find any. My user home directory is still there intact, I got into the 'Users and Groups' admin dialog and re-entered my user password in case the system had somehow lost it. All of the drives seem to be ok. I don't know which logs I should look at for a clue as to what's gone wrong. But I still can't log in as my normal user.

Any pointers to help me get this sorted will be much appreciated.

Failing that, I could always reinstall, but the thought of all that work makes me cringe.

Last edited by genogebot; 12-24-2010 at 03:42 AM.
 
Old 12-24-2010, 03:46 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
Check if you have free disk space by:
Code:
df -h
 
Old 12-24-2010, 03:51 AM   #3
genogebot
Member
 
Registered: Jun 2010
Location: Brisbane, Australia
Distribution: Xubuntu 16.04.1 / Linux Mint 18 XFCE / Linux Mint 18 Mate / Ubuntu Server 16.04.1 / Lubuntu 16.04.1
Posts: 136

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by eSelix View Post
Check if you have free disk space by:
Code:
df -h
Thanks for the quick response.

I've got 78 gig of free disk space on a 106 gig drive, so that should be plenty.

I've checked all the hardware and everything seems to be ok.
 
Old 12-24-2010, 04:00 AM   #4
nocountryman
Member
 
Registered: Dec 2009
Location: Bulgaria for now :)
Distribution: Fedora 14
Posts: 60

Rep: Reputation: 3
try to login in init 1 and do a filesystem check. maybe a file got corrupt. also check permissions on the /home/$user if its on separate partition check if it is mounted correctly. when in init 1 or logged in as root check the dmesg for errors.
 
Old 12-24-2010, 04:23 AM   #5
genogebot
Member
 
Registered: Jun 2010
Location: Brisbane, Australia
Distribution: Xubuntu 16.04.1 / Linux Mint 18 XFCE / Linux Mint 18 Mate / Ubuntu Server 16.04.1 / Lubuntu 16.04.1
Posts: 136

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by nocountryman View Post
try to login in init 1 and do a filesystem check. maybe a file got corrupt. also check permissions on the /home/$user if its on separate partition check if it is mounted correctly. when in init 1 or logged in as root check the dmesg for errors.
Thanks for the reply.

I logged into the 'recovery' mode command prompt and tried 'fsck /dev/sda1' which is the system partition (that contains my home directory), but I got a warning that it was mounted and if I continued I would cause severe damage, so I cancelled it. Is there some other way to check the system partition for errors? 'Init 1' just took me back to the grub menu.

I couldn't find any errors in dmesg.

While I was logged in to the desktop as root I checked my user directory permissions and they're all still ok - everything seems to be owned by my user id.

I think you're probably right about a file corruption somewhere but I don't know how to go about fixing it. I'll do some hunting around and see what I can find.
 
Old 12-24-2010, 05:00 AM   #6
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
You can remount your device as read only by:
Code:
mount -o remount,ro /dev/sda1
but to check only (fsck -n if you use ext), not repair. Or just start system from LiveCD/USB.

Last edited by eSelix; 12-24-2010 at 05:10 AM.
 
Old 12-24-2010, 05:13 AM   #7
genogebot
Member
 
Registered: Jun 2010
Location: Brisbane, Australia
Distribution: Xubuntu 16.04.1 / Linux Mint 18 XFCE / Linux Mint 18 Mate / Ubuntu Server 16.04.1 / Lubuntu 16.04.1
Posts: 136

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by eSelix View Post
You can remount your device as read only by:
Code:
mount -o remount,ro /dev/sda1
or just start system from LiveCD/USB.
Ok I booted from the Mint 9 live cd, and it didn't find any problems other than the superblock last boot time being in the future, and fsck reported that was probably a hardware clock issue because the discrepancy was less than a day.

So it seems its not a corrupt file system. Perhaps it's just one of my user config files got messed up.

I suspect there's something relevant in one of the log files but I had a look at the log file viewer and there is a huge number of large log files, and I don't have any idea which ones to look at.
 
Old 12-24-2010, 05:18 AM   #8
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
To check this create another user and login as him. If it work then this will mean something with your old user home directory is wrong.
 
Old 12-24-2010, 05:32 AM   #9
genogebot
Member
 
Registered: Jun 2010
Location: Brisbane, Australia
Distribution: Xubuntu 16.04.1 / Linux Mint 18 XFCE / Linux Mint 18 Mate / Ubuntu Server 16.04.1 / Lubuntu 16.04.1
Posts: 136

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by eSelix View Post
To check this create another user and login as him. If it work then this will mean something with your old user home directory is wrong.
Good call. I created a new user and logged in without a problem, so it looks like something in my user config got messed up. Now its just a matter of working out what, and if I can do anything to fix it.

Last edited by genogebot; 12-24-2010 at 05:35 AM.
 
Old 12-24-2010, 05:52 AM   #10
genogebot
Member
 
Registered: Jun 2010
Location: Brisbane, Australia
Distribution: Xubuntu 16.04.1 / Linux Mint 18 XFCE / Linux Mint 18 Mate / Ubuntu Server 16.04.1 / Lubuntu 16.04.1
Posts: 136

Original Poster
Rep: Reputation: 18
Haha it's my own fault after all.

Problem solved, and it had nothing to do with the lockup and reboot. It was my own stupid fault for editing my .profile file.

This is how I found the cause:

I started randomly looking in my user home directory, and eventually looked at a file '.xsession-errors'.

In that file was a message about a syntax error in '.profile', and I remembered that early this morning I followed the advice I read on a forum about storing commonly used bash commands in the .profile file as functions, and so I copied and pasted one of the examples into my .profile file.

Apparently the example contained a syntax error, and that was all it took to prevent me from logging in, because after I deleted the function from the .profile file I can now log in without a problem.

Lesson learned. Don't blindly follow suggestions on forums. Sheesh. Who'd a thought it was that easy to trash a system.

Last edited by genogebot; 12-24-2010 at 05:56 AM.
 
Old 12-24-2010, 05:56 AM   #11
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
Lesson learned. Don't blindly follow suggestions on forums. Sheesh.
And make notes from things you change on your system.

Kind regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
reboot by a non-root user? iron_toupee Linux - Newbie 6 10-30-2007 03:06 AM
halt/reboot as a non-root user Pau Gasol Slackware 3 10-05-2007 12:47 PM
After reboot I can only log in as root RemusX2 Linux - General 3 12-26-2004 12:01 AM
Cant only log in as root after user log-in. ADJenkins Linux - General 2 11-17-2004 05:18 PM
Log Out root Then Log In As Other User xtremcoder Linux - General 4 10-05-2004 12:01 AM


All times are GMT -5. The time now is 06:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration