红联Linux门户
Linux帮助

Exadata的OS用戶密码过期

发布时间:2014-09-03 10:21:04来源:linux网站作者:mrluoe

发现Exadata上的OS用户过期了,虽然知道Exadata上的OEL在用户密码上的要求进行了加强,但是發現OS用戶的密码的有效期只有90天,这样的话每90天就要修改一次密码,太麻煩了,就都改成了不收限制:


查看用户的密码有效期:

[root@dm01cel01 ~]# chage -l root

Last password change                                    : Aug 09, 2012

Password expires                                        : Nov 07, 2012

Password inactive                                       : never

Account expires                                         : never

Minimum number of days between password change          : 1

Maximum number of days between password change          : 90

Number of days of warning before password expires       : 7

[root@dm01cel01 ~]# chage -l celladmin

Last password change                                    : password must be changed

Password expires                                        : never

Password inactive                                       : never

Account expires                                         : never

Minimum number of days between password change          : 1

Maximum number of days between password change          : 90

Number of days of warning before password expires       : 7

[root@dm01cel01 ~]# chage -l cellmonitor

Last password change                                    : May 10, 2012

Password expires                                        : Aug 08, 2012

Password inactive                                       : never

Account expires                                         : never

Minimum number of days between password change          : 1

Maximum number of days between password change          : 90

Number of days of warning before password expires       : 7

[root@dm01cel01 ~]# chage -l public

Last password change                                    : Aug 02, 2012

Password expires                                        : Oct 31, 2012

Password inactive                                       : never

Account expires                                         : never

Minimum number of days between password change          : 1

Maximum number of days between password change          : 90

Number of days of warning before password expires       : 7

[root@dm01cel01 ~]#


注:上面的celladmin用户的Password expirs显示为never,并不是说该用户的用户密码永不过期,而是因为该用户的密码已经过期了Password must be changed

 
修改,99999表示永不过期Never:

chage -M 99999 root

chage -M 99999 celladmin

chage -M 99999 cellmonitor

chage -M 99999 public

[root@dm01cel01 ~]# chage -l root

Last password change                                    : Aug 09, 2012

Password expires                                        : never

Password inactive                                       : never

Account expires                                         : never

Minimum number of days between password change          : 1

Maximum number of days between password change          : 99999

Number of days of warning before password expires       : 7

[root@dm01cel01 ~]# chage -l celladmin

Last password change                                    : password must be changed

Password expires                                        : never

Password inactive                                       : never

Account expires                                         : never

Minimum number of days between password change          : 1

Maximum number of days between password change          : 99999

Number of days of warning before password expires       : 7

[root@dm01cel01 ~]# chage -l cellmonitor

Last password change                                    : May 10, 2012

Password expires                                        : never

Password inactive                                       : never

Account expires                                         : never

Minimum number of days between password change          : 1

Maximum number of days between password change          : 99999

Number of days of warning before password expires       : 7

[root@dm01cel01 ~]# chage -l public

Last password change                                    : Aug 02, 2012

Password expires                                        : never

Password inactive                                       : never

Account expires                                         : never

Minimum number of days between password change          : 1

Maximum number of days between password change          : 99999

Number of days of warning before password expires       : 7


其他节点上的用户使用同样操作即可。