Operating System - HP-UX
1751977 Members
4585 Online
108784 Solutions
New Discussion

Re: How set password expiry date

 
Asif_8
Regular Advisor

How set password expiry date

How to set  or update user expiry date of password

3 REPLIES 3
Syedfurquan
Trusted Contributor

Re: How set password expiry date

Hi,

 

You can use command.

 

passwd -n 7 -x 70 -w 14 username

 

This will not allow the user to change its password within 7days, maximum validity of password 70 days and give a warning to change password before 14days of expiring.

You can change the parameter according to your needs.

 

regards

Syed

 

 

*** please click on kudos if my post helps you..!!!!

Regards,
Syed
Asif_8
Regular Advisor

Re: How set password expiry date

I got following error
Option -w is disabled. You must enable shadow passwords

passwd -n 7 -x 70 gz
<min> argument rounded up to nearest week
<max> argument rounded up to nearest week
Syedfurquan
Trusted Contributor

Re: How set password expiry date

Hi ,

 

Its ok.

-w will work only when /etc/shadow is enable.

 

You can check now user status by command

passwd -s username

 

regards

Syed

Regards,
Syed