x wrote:
>
> I can't seem to find it in the passwd man page and I know this is possible
> (at least in HP-UX), but I've previously been able to set a one-time
> password for new users (or if they'd forgotten their passwd) where upon
> logging in, they'd be prompted to create a new password.
>
> That's kind of a thick sentence, but in other words, say user 'foo' needed
> to get her passwd reset. As the sys admin, I do a one-time passwd change
> for the 'foo' user to 'bar'. Upon logging back in and entering her new
> 'bar' password, the 'foo' user is now prompted to change her password. She
> cannot go further until she enters a new valid password the system likes.
> Does this make sense?
>
> Anyway, I'd really appreciate any info on this because I know it's possible
> (at least in HP-UX so I'm presuming it's possible in linux), but for the
> life of me, I can't find out how.
>
> Thanks in advance,
>
> -Charlie
# chage -M 0 charlie
Or, more verbose:
# chage charlie
Changing the aging information for charlie
Enter the new value, or press return for the default
Minimum Password Age [0]:
Maximum Password Age [99999]: 0 <======<<<
Last Password Change (YYYY-MM-DD) [2000-11-18]:
Password Expiration Warning [7]:
Password Inactive [-1]:
Account Expiration Date (YYYY-MM-DD) [1969-12-31]:
# ssh localhost -l charlie
charlie@localhost's password:
You are required to change your password immediately (password aged)
Warning: Your password has expired, please change it now
Changing password for charlie
(current) UNIX password:
HTH,
Pierre