1828584 Members
2540 Online
109982 Solutions
New Discussion

passwd option in Linux

 
SOLVED
Go to solution
Patrick Chim
Trusted Contributor

passwd option in Linux

Hi,

Does anyone know whether there is a command in RedHat 7.0 to force a user to change his passwd at next logon just like HP's 'passwd -f' ?

Regards,
Patrcik
3 REPLIES 3
Balaji N
Honored Contributor

Re: passwd option in Linux

Hi Patrick,
Not pretty sure if there is a straight command.

But you can use chage command to manipulate what you want.

HTH
Balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
U.SivaKumar_2
Honored Contributor
Solution

Re: passwd option in Linux

Hi,

A Trick read somewhere,

# chage -M 730 test

set password expiry after two years

# chage -d 1999-01-01 test

set last password change to two years back than the system date.

Now the user test will be forced to change his
password .

regards,
U.SivaKumar

Innovations are made when conventions are broken
Ionut Grigorescu_2
Super Advisor

Re: passwd option in Linux

in one command:

#chage -M 2 -d 2002-10-29 user

when maxdays(M) + lastday (d) are less than current day the user will be forced to change the passwd immediately. See the manpage..

:-)
If it weren't for STRESS I'd have no energy at all