As a security manner, we want new users to change password at first logon.
We have a solution to force users which have "passwd expiration" > 0 changing their password at first logon. And this work fine.
When users with "passwd expiration" = 0, we can not automatically force the users to change password at first logon.
The login trigger fires *after* they have logged in, so you can't use it to immediately change them. It would be complex, but you could write a login trigger to set their expiration to be > 1 then set it back to 0 after they have changed it.
If users with "passwd expiration" > 0,
we set the pwdate = "number of passwd expiration backward from today" when we create them first time.
eg. If user with "passwd expiration"=60
pwdate=dateadd(day, -60, GETDATE())
And the user will receive a message from Sybase warning the password has expired. But you still can log in. If you do not change password, the password will expired and the account will be locked next time.
But if user has "passwd expiration" = 0, this method does not work correctly.
Can anybody tell how to force user to change the password on first logon?
We are having option in 15.0.2 that ( sp_password policy "set".....), but how to do this in 12.5??
How to deal with the option of login trigger? if it is working?
Thanks for help..