Activities

November 2015
M T W T F S S
« Sep   Jan »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Your account has expired; please contact your system administrator

I had setup a normal user account on one of local Linux server few years before. When I’m trying to ssh to that server, I’m getting “Your account has expired; please contact your system administrator”. I did not set any password expiration when I’m creating this user account. So I think system using default account expiration settings.

password_expiration

How do I enable my user account.

a. Modify the expiration date to never (chage -M -1 username)
b. Reset the current expiration date to higher than current date(usermod -e 2018-01-01 username).

Also I’m seeing “/var/log/secure” showing following error,

Nov 20 12:04:39 rc-025 sshd[17281]: pam_unix(sshd:account): account liju has expired (account expired)
Nov 20 12:04:39 rc-025 sshd[17281]: Failed password for liju from 192.168.0.14 port 63664 ssh2
Nov 20 12:04:39 rc-025 sshd[17282]: fatal: Access denied for user liju by PAM account configuration

a. Modifying expiration date to never

[root@025 jigie]# chage -l liju
Last password change                                    : Jul 03, 2015
Password expires                                        : Nov 30, 2015
Password inactive                                       : never
Account expires                                         : Aug 25, 2015
Minimum number of days between password change          : 60
Maximum number of days between password change          : 150
Number of days of warning before password expires       : 7
[root@025 jigie]#  chage -M -1 liju
[root@025 jigie]# chage -l liju
Last password change                                    : Jul 03, 2015
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : Aug 25, 2015
Minimum number of days between password change          : 60
Maximum number of days between password change          : -1
Number of days of warning before password expires       : 7

b. Setting expiration date is to higher

[root@025 jigie]# usermod -e 2018-01-01  liju
[root@025 jigie]# chage -l liju
Last password change                                    : Jul 03, 2015
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : Jan 01, 2018
Minimum number of days between password change          : 60
Maximum number of days between password change          : -1
Number of days of warning before password expires       : 7
[root@025 jigie]#

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>