cancel
Showing results for 
Search instead for 
Did you mean: 

Password Aging

SOLVED
Go to solution
Abubakkar
Frequent Contributor

Password Aging

How to set password aging?. if i want expire passwd on with in two days.Kindly expain syntax.
6 REPLIES
Ahmed Douban
Frequent Advisor
Solution

Re: Password Aging

as root

# usermod -e mm/dd/yy username

-e used to change the user expiration date

-e will only work if you have shadow file

for password aging

# passwd -n 7 -x 70 -w 14 username

-n user cannot change his password after this defined period

-x password expire after this period

-w warning period

Hakki Aydin Ucar
Honored Contributor

Re: Password Aging

Wilfred Chau_1
Respected Contributor

Re: Password Aging

Hakki Aydin Ucar
Honored Contributor

Re: Password Aging

Additionally if you want to disable password aging just use passwd to create new password:
# passwd denee
Changing password for denee
New password:
Re-enter new password:
Passwd successfully changed
# logins -x -l denee
denee 120 users 20 ,,,
/home/denee
/usr/bin/sh
PS 000000 -1 -1 -1
password aging is disabled now in untrusted system.
just add user can change the password after 7 days :
# passwd -n 1 denee
argument rounded up to nearest week
# logins -x -l denee
denee 120 users 20 ,,,
/home/denee
/usr/bin/sh
PS 051211 7 0 -1
aware of that you can see the date modified only if you put this option.

Dennis Handly
Acclaimed Contributor

Re: Password Aging

Do you have a trusted system?
If not, you only have granularity in terms of weeks.
Ismail Azad
Esteemed Contributor

Re: Password Aging

Hey AbuBakkar,

Rememember you have to be in shadow mode for this and it requires the execution of pwconv if you are in standard passwd mode. As mentioned just specify the expiry date.

Regards
Ismail Azad
Read, read and read... Then read again until you read "between the lines".....