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 02-19-2010, 11:57 PM   #1
Sunheer
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Rep: Reputation: 0
Angry user account got expired.


Hi all,

two days before I have formatted my / partition and everything seems to working fine. Next day I came to office and try to login as root through ssh. I am getting the error: [sunheer@svn ~]$ ssh root@192.10.10.23
root@192.10.10.23's password:
Permission denied, please try again.
root@192.10.10.23's password:

I thought the password were wrong and I rebooted the server in to run level 1 and reset the password and it started to work. Again on next day the account got same problem. This started to happen after formatting the / partition.

Please help me to fix this issue.

Regards
Sunheer V
 
Old 02-20-2010, 12:48 AM   #2
mattca
Member
 
Registered: Jan 2009
Distribution: Slackware 14.1
Posts: 333

Rep: Reputation: 56
I'm not sure I understand exactly what's happening, but the first thing I would check is:

/etc/ssh/sshd_config

You can deny root logins. Look for this:

Code:
PermitRootLogin no
But if it allows you sometimes, and denies you other times, then the problem is probably somewhere else.
 
Old 02-21-2010, 07:53 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,415

Rep: Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785Reputation: 2785
You really shouldn't allow root login from externally eg ssh.
In any case, get back in as root, then check the settings in /etc/shadow and lookup the chage cmd: http://linux.die.net/man/1/chage.
Also, add you distro & version to your profile to help us help you.
 
Old 02-21-2010, 07:58 PM   #4
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: EndeavourOS
Posts: 650

Rep: Reputation: 79
can you log in locally as root? If so, sounds like a ssh config problem, but as Chrism01 said, allowing root logins through ssh is not the best idea. You can always su once your in.
 
Old 02-21-2010, 11:21 PM   #5
Sunheer
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bret381 View Post
can you log in locally as root? If so, sounds like a ssh config problem, but as Chrism01 said, allowing root logins through ssh is not the best idea. You can always su once your in.


No. I am not able to login locally also. Every time I need to go to run level 1 and change the password.

My system is RHEL-5
 
Old 02-21-2010, 11:27 PM   #6
Sunheer
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chrism01 View Post
You really shouldn't allow root login from externally eg ssh.
In any case, get back in as root, then check the settings in /etc/shadow and lookup the chage cmd: http://linux.die.net/man/1/chage.
Also, add you distro & version to your profile to help us help you.



I think it may be the problem regarding with the date. Please see my chage commands output.

[root@oracleserver ~]# chage -l root
Last password change : Jan 01, 2005
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
-------------------------------------------------------

and I changed the date to present and rebooted the machine.


Regards
Sunheer V
 
Old 02-21-2010, 11:28 PM   #7
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
Try setting the account to not disable after the password expires

Code:
usermod -f -1 root
May also want to set an expiration date like 100 years from now.
Code:
usermod -e 3010-01-01 root
 
  


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
cron reporting user account expired, chage -l shows it never expires? kschmitt Linux - Server 5 01-06-2010 09:18 AM
Expired user account? lt_wentoncha SUSE / openSUSE 2 04-27-2007 12:34 AM
user account expired ??? rahimzai Red Hat 3 10-10-2005 06:03 AM
Re-enable an expired account xcoach Linux - Newbie 0 04-16-2004 11:39 AM
.... Can More Login - Account Expired (help!) Beuzekom Linux - Newbie 11 10-08-2003 11:45 AM

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

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