1833953 Members
2276 Online
110063 Solutions
New Discussion

Password issue

 
SOLVED
Go to solution
shivan
Occasional Advisor

Password issue

We force reset password of user at login and when user login we see error below. Can someone help us on this issue.
# passwd -f xxxx
$ su - xxxx
Your password was changed by root
Password:
Last successful login for xxxx: Tue Dec 19 EST5EDT 2006
Last unsuccessful login for xxxx: Tue Dec 19 EST5EDT 2006
Your password has expired.
su: Password for xxxx has expired. Choose new password and try again
su: Sorry
8 REPLIES 8
Peter Godron
Honored Contributor

Re: Password issue

Shivan,
this is the correct behaviour !
From "man passwd":
"-f Force user to change password upon next login by expiring the current password."

So you expire the pasword and then log on as that user and the password is signalled as expired.
Yogeeraj_1
Honored Contributor

Re: Password issue

hi,

to prevent this from occurring, you should not use the "-f" switch when issueing the passwd command. otherwise, it will ask from a password change when the user tries to login next time.


hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
shivan
Occasional Advisor

Re: Password issue

How do we fix this issue. We want user to change password on login.
shivan
Occasional Advisor

Re: Password issue

This works very well on solaris. When we force change password of user (passwd -f xxxx), system prompts for old password and then choose new password on user xxxx login.
Peter Godron
Honored Contributor
Solution

Re: Password issue

Hi,
the way to fix this is to log on again (without su).
So,as root:
passwd -f xxx

Now log on as the user for whom you changed the password and it will state that the password is expired and ask the user to change the password.

If you su - to the user the process does not work the way you want it to.

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.
Senthil Prabu.S_1
Trusted Contributor

Re: Password issue

Hi,
This is not an issue, it works as it designed. You are handling it in a wrong way.


After executing passwd -f user, please set the new password for that user. This can be done either when you try to login using that user or run passwd command as root again to set the new password for that particular user.

unless, you set a password for that user, you cannot do a su, it will fail....


HTH,
Prabu.S
One man's "magic" is another man's engineering. "Supernatural" is a null word.
shivan
Occasional Advisor

Re: Password issue

Peter, thanks for the info. Password expiry works well but does not work when we do su.
shivan
Occasional Advisor

Re: Password issue

Thanks to Peter.