Skip to main content

Linux turn OFF password expiration / Aging

Linux turn OFF password expiration / Aging

/etc/shadow stores actual password in encrypted format for user’s account with additional properties related to user password.

The password expiration information for a user is contained in the last 6 fields. Password expiration for a select user can be disabled by editing the /etc/shadow file. However I recommend using chage command. The chage command changes the number of days between password changes and the date of the last password change. This information is used by the system to determine when a user must change his/her password.


To list current aging type chage command as follows:
# chage -l avinash
Output:
Last password change : May 22, 2007
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

To disable password aging / expiration for user foo, type command as follows and set:Minimum Password Age to 0Maximum Password Age to 99999Password Inactive to -1A ccount Expiration Date to -1
Interactive mode command:# chage username
OR
# chage -I -1 -m 0 -M 99999 -E -1 username


Thanks & Regards

Avinash Pillai


Email: avinashp25[AT]gmail[DOT]com

Comments

Popular posts from this blog

Ephone Hunt Groups and Voice Hunt Groups Comparison

SIP phones support Voice Hunt Groups. SCCP phones support Ephone Hunt Groups, and in Cisco Unified CME 4.3 and later versions, SCCP phones also support Voice Hunt Groups.  Table 69  compares the features of Ephone Hunt Groups and Voice Hunt Groups. Table 69 Feature Comparison of Ephone Hunt Groups and Voice Hunt Groups Feature Ephone Hunt Voice Hunt Group Endpoints Supported SCCP only SIP, SCCP, PSTN, and FXS Parallel Hunt Groups (Call Blast) No (for alternative, see the  "Shared-Line Overlays" section ) Yes Hunt Statistics Support Yes No B-ACD Support Yes No Features such as present-call and login/logout Yes No Thanks & Regards Avinash Pillai URL :  http://avinashpillai.blogspot.com Email: avinashp25[AT]gmail[DOT]com

Seven Personal Qualities Found In A Good Leader

Whether in fact a person is born a leader or develops skills and abilities to become a leader is open for debate. There are some clear characteristics that are found in good leaders. These qualities can be developed or may be naturally part of their personality. Let us explore them further. Seven Personal Qualities Found In A Good Leader: 1. A good leader has an exemplary character. It is of utmost importance that a leader is trustworthy to lead others. A leader needs to be trusted and be known to live their life with honestly and integrity. A good leader “walks the talk” and in doing so earns the right to have responsibility for others. True authority is born from respect for the good character and trustworthiness of the person who leads.   2.A good leader is enthusiastic about their work or cause and also about their role as leader. People will respond more openly to a person of passion and dedication. Leaders need to be able to be a source of inspiration, and b...

What is Cybersecurity Risk? Definition & Factors to Consider

  Cybersecurity risk has become a leading priority for organizations as they embrace digital transformation and leverage advanced technology solutions to drive business growth and optimize efficiencies. Additionally, many organizations are increasingly reliant on third-party and   fourth-party vendors   or programs.  In this post, we’ll explore what cybersecurity risk is and take a look at some key cybersecurity risk factors that organizations across all industries should keep in mind as they build and refine their   cybersecurity risk management strategy .   What is cybersecurity risk? Cybersecurity risk refers to   potential threats and vulnerabilities   in digital systems. It encompasses the likelihood of a cyberattack compromising data or systems, leading to financial,   reputational , or operational damage. A few examples of cybersecurity risks include   ransomware ,   malware ,   insider threats ,   phishing attacks ...