Score:0

how to change the account password expiration date in Linux

lu flag

I am confused about the password expiration date in Linux. Looks like chage command -e changes the account expiration date not the password expiration date. They are totally different. I can not find any command that can be used to change the password expiration date. They all change the user expiration date. is there any way to do this? Thanks a lot.

Score:0
ng flag

Use chage -M. For example, to set 90 days as the maximum before password expiry enter sudo chage -M 90 <username>.

EDIT: To set an exact expiration date you need to figure out how many days that are between the Last password change date (see chage -l) and your desired password expiration date and then use that number in chage -M.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.