[20220623]linux 口令expire問題.txt

lfree 發表於 2022-06-27
Linux

[20220623]linux 口令expire問題.txt

--//今天登入伺服器提示:
[email protected]'s password:
Send automatic password
Warning: your password will expire in 4 days

# chage -l root
Last password change                                    : Apr 28, 2022
Password expires                                        : Jun 27, 2022
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 1
Maximum number of days between password change          : 60
Number of days of warning before password expires       : 7

# chage -l  oracle
Last password change                                    : Apr 30, 2022
Password expires                                        : Jun 29, 2022
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 1
Maximum number of days between password change          : 60
Number of days of warning before password expires       : 7
--//可以發現兩個使用者快到expires時間點。

--//執行如下:
chage -d 9999 -E -1 -m -1 -M -1 -W -1 oracle
chage -d 9999 -E -1 -m -1 -M -1 -W -1 root
chage -d 9999 -E -1 -m -1 -M -1 -W -1 grid

# chage -l  oracle
Last password change                                    : May 18, 1997
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : -1
Maximum number of days between password change          : -1
Number of days of warning before password expires       : -1

--//這樣可以一勞永逸解決問題,當然安全問題是另當別論。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2903032/,如需轉載,請註明出處,否則將追究法律責任。