Operating System - Linux
1819870 Members
2569 Online
109607 Solutions
New Discussion юеВ

Expiry date for user's password

 
M.M. Oee
Contributor

Expiry date for user's password

How to set the date period (e.g. 90 days) to force the users to change their password?

Regards
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Expiry date for user's password

as root


passwd -x 90 username

That will do it

As far as I know you'll need to do it one user at a time.

You an also do it as an option to the useradd command.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
U.SivaKumar_2
Honored Contributor

Re: Expiry date for user's password

Hi,

The -M option of the chage command specifies the maximum number of days the password is valid. So, for instance, if you want a user's password to expire in 90 days, type the following command:

chage -M 90 username

regards,

U.SivaKumar




Innovations are made when conventions are broken
Paul Sperry
Honored Contributor

Re: Expiry date for user's password

passwd -x max username



Determine the maximum number of days, max, a password
can remain unchanged. The user must enter another
password after that number of days has transpired,
known as the password expiration time.