Linux viewing, modifying user and password expiration times

Source: Internet
Author: User

Warning:your Password has expired. Password change Required but no TTY available.

Prompt for password expiration,

To set the expiration time for a new user password

The following example:

[[email protected]/]# passwd-x Euser, after the operation, the password time of the Euser user is changed to 90 days validity period.

2. View the Euser user expiration information using the Chage command

The parameters of the chage include
The minimum number of days that the-m password can change. At zero, the password can be changed at any time.
The maximum number of days that the-m password remains valid.
The number of days before the-W user password expires before the warning message is received.
The date that the-e account expires. This account will not be available after this day.
-D last Changed date
-I stasis period. If a password has expired these days, then this account will not be available.
The-l example shows the current setting. By non-privileged users to determine when their password or account expires.

The following example:

[Email protected]/]# chage-l Euser

Last password Change:aug 28, 2015 "Time of most recent password change"

Password Expires:nov 26, 2015 "Password expiry time"

Password inactive:never "Password Expiration Time"

Account Expires:jan 31, 1970 "Expiry date"

Minimum number of days between password change:0 "two times the minimum distance between password changes"

Maximum number of days between password change:90 "two times password Change password maximum distance from day of the day of the warning before password expires:15 "Number of days before password expires"

3. Set Euser user Expiration time

Examples are as follows:

[Email protected]/]# chage-e Euser



This article is from the "Dream to Reality" blog, please be sure to keep this source http://lookingdream.blog.51cto.com/5177800/1791022

Linux viewing, modifying user and password expiration times

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.