Which file does HP-UX keep the number of past passwords

The parameter PASSWORD_HISTORY_DEPTH in the /etc/default/security file controls how many past passwords HP-UX will remember the password to prevent the user from using the same old passwords he uses. Set the number as you like.

root@hp-ux11.11:/ # passwd user
Changing password for user
Last successful password change for user: Wed Apr 23 00:06:26 2008
Last unsuccessful password change for user: Thu Feb  7 12:34:42 2008

New password:
You may not re-use a previously used password.