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 04-29-2007, 09:16 AM   #1
stillkid
LQ Newbie
 
Registered: Apr 2007
Posts: 10

Rep: Reputation: 0
linux login problem


i logged out last night fine after using it for 2 hours. and now when i try to login as root it popup a window saying
your account has expired contact your system administrator.

and at the bottem it says that
the admin says blocked your account.

i tried to login with my backup account and same message appears there and i also tried an account created when i was loggedin last time and same message appears then also.
 
Old 04-29-2007, 09:52 AM   #2
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
Can you login at any other runlevel? Try logging in at Runlevel 3. If that works it might be an X related problem or the permissions for /etc/securetty might have been changed.
If you can't login at runlevel 3, login to single usermode by typing init=/bin/sh at the end of the kernel line on the grub menu. Check if your /etc/shadow file is intact.
 
Old 04-29-2007, 01:09 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Assuming that you own this system, simply log in in single user mode. (When the grub screen appears, hit any key to stop the countdown, and then e for edit. Select the kernel line and add "single" to the end---then reboot)

If this does not work, then the ultimate weapon is a live CD. Boot up from the CD, mount the drive with your Linux system, find /etc/passwd and edit it to remove the "x" after root. The entry will wind up looking like this:
root::0:0:root:/root:/bin/bash
-----^---x removed

When you reboot, you will be able to log in as root with no password
 
Old 04-29-2007, 11:38 PM   #4
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
Thats another way of doing it. But some distributions have agetty or mingetty on single user mode as well so you might not be able to login at that runlevel either. You can bypass the login altogether by specifying: init=/bin/sh at the end of the kernel line on the grub menu.

Once you get the shell prompt, you can mount the root partition read-write:

mount -o remount,rw /

I don't know about removing the x from /etc/passwd though Pixellany. If the OP boots up at runlevel 3-5 its leaving him wide open for intrusions. Better to find the root of the problem and keep that as a last resort
 
Old 04-30-2007, 12:57 AM   #5
stillkid
LQ Newbie
 
Registered: Apr 2007
Posts: 10

Original Poster
Rep: Reputation: 0
its not a matter of security because no one but me have access to my computer and i don't use internet through my linux at all, and don't intend to do so much in near future.

and i don't know about grub because its all grapical using kde. after i select it from my os menu while booting, it is all automatic, it starts all the service it self and at one stage it ask for interactive setup, which if selected only ask wheter to start a service or not and no other command can be entered.

i can do the live cd option. because my installed version in redhat9 and i also own a suse linux 9.0 live cd.
i will post the result after trying it.
 
Old 04-30-2007, 09:02 AM   #6
stillkid
LQ Newbie
 
Registered: Apr 2007
Posts: 10

Original Poster
Rep: Reputation: 0
Problem has been solved.

SlackDaemon your idea of init=/bin/sh didn't worked and i don't know how to use runlevel3.

pixellany putting single at the end of kernel line in grub worked and opened shell prompt.

SlackDaemon your 2nd idea of mount on shell prompt didn't gave any error but didn't solved it either.


Solution:
i turned my system clock 1 year back to 2006 in bios. and i was able to login. i loged back out only to check that does this work again and turned clock to 2007 and again the same error of account expiration. so i turned it back to 2006 and loged back in.
in user properties i disabled the option of password expiration in both root and my 2nd account, and also put account expiring on root till 2008.
i restarted and put clock back to 2007 and i was able to login without any problem to both accounts, so it was problem with password expiration which is default in linux and have to be disabled by yourself.
 
Old 04-30-2007, 12:02 PM   #7
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
Quote:
Originally Posted by stillkid
Problem has been solved.

SlackDaemon your idea of init=/bin/sh didn't worked and i don't know how to use runlevel3.
Sorry, I assumed you knew a bit about editing grub entries. It will work if you place it in the same spot you placed the single entry that pixellany mentioned (at the end of the kernel line)

Quote:
Originally Posted by stillkid
SlackDaemon your 2nd idea of mount on shell prompt didn't gave any error but didn't solved it either.
Mounting / as read-write was not a solution, it was to ensure that any changes you made to configurations would have been saved to disk. My fault for not explaining it a bit better.

Glad that you sorted it out though.
 
Old 05-01-2007, 05:35 AM   #8
stillkid
LQ Newbie
 
Registered: Apr 2007
Posts: 10

Original Poster
Rep: Reputation: 0
well i put init=/bin/sh at the same spot i did single but for some reasons it didn't work.
 
Old 05-01-2007, 07:56 AM   #9
SlackDaemon
Member
 
Registered: Mar 2006
Distribution: RedHat, Slackware, Experimenting with FreeBSD
Posts: 222

Rep: Reputation: 30
Quote:
Originally Posted by stillkid
well i put init=/bin/sh at the same spot i did single but for some reasons it didn't work.
Its a wonder your system is booting up then. You said you use RedHat 9. I just tried it on the same OS.
You should thoroughly check your system to make sure no one else has tampered with it. Check where the sh file is by typing which sh. It'll give you the location.
 
  


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
linux login problem sonika_singhi Linux - Enterprise 3 12-31-2004 05:51 PM
linux login problem sonika_singhi Linux - General 5 12-31-2004 12:45 PM
linux login problem sonika_singhi Linux - Software 4 12-28-2004 02:53 PM
Linux login problem scracker Linux - Newbie 2 09-14-2003 09:55 PM
Linux graphical login problem kbkmayya Linux - Newbie 2 07-03-2003 03:26 PM

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

All times are GMT -5. The time now is 05:42 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